Currently, the makedumpfile option '--message-level' is set to 1 when
dumping the vmcore, it only displays the progress indicator message,
but there are no common message and error message, it is important to
report some additional messages, especially for the error message,
which is very useful for the debugging.
In view of this, let's change the message level to 7 by default.
Signed-off-by: Lianbo Jiang <lijiang(a)redhat.com>
---
kdump-lib-initramfs.sh | 2 +-
kdump.conf | 6 +++---
kdump.conf.5 | 16 ++++++++--------
kexec-kdump-howto.txt | 18 +++++++++---------
tests/scripts/testcases/local-kdump/0-local.sh | 2 +-
tests/scripts/testcases/nfs-kdump/1-client.sh | 2 +-
tests/scripts/testcases/ssh-kdump/1-client.sh | 2 +-
7 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh
index c98a43b473cd..8ef3cd00615a 100755
--- a/kdump-lib-initramfs.sh
+++ b/kdump-lib-initramfs.sh
@@ -4,7 +4,7 @@
KDUMP_PATH="/var/crash"
CORE_COLLECTOR=""
-DEFAULT_CORE_COLLECTOR="makedumpfile -l --message-level 1 -d 31"
+DEFAULT_CORE_COLLECTOR="makedumpfile -l --message-level 7 -d 31"
DMESG_COLLECTOR="/sbin/vmcore-dmesg"
FAILURE_ACTION="systemctl reboot -f"
DATEDIR=`date +%Y-%m-%d-%T`
diff --git a/kdump.conf b/kdump.conf
index 9fc0a4fb7538..e4db52e2db97 100644
--- a/kdump.conf
+++ b/kdump.conf
@@ -62,9 +62,9 @@
# as the initrd will automatically be populated with a
# config file appropriate for the running kernel.
# The default core_collector for raw/ssh dump is:
-# "makedumpfile -F -l --message-level 1 -d 31".
+# "makedumpfile -F -l --message-level 7 -d 31".
# The default core_collector for other targets is:
-# "makedumpfile -l --message-level 1 -d 31".
+# "makedumpfile -l --message-level 7 -d 31".
#
# "makedumpfile -F" will create a flattened vmcore.
# You need to use "makedumpfile -R" to rearrange the dump data to
@@ -169,7 +169,7 @@
#ssh user(a)my.server.com
#sshkey /root/.ssh/kdump_id_rsa
path /var/crash
-core_collector makedumpfile -l --message-level 1 -d 31
+core_collector makedumpfile -l --message-level 7 -d 31
#core_collector scp
#kdump_post /var/crash/scripts/kdump-post.sh
#kdump_pre /var/crash/scripts/kdump-pre.sh
diff --git a/kdump.conf.5 b/kdump.conf.5
index 34c996c76888..4be3c7773de5 100644
--- a/kdump.conf.5
+++ b/kdump.conf.5
@@ -85,9 +85,9 @@ for the running kernel.
.PP
Note 1: About default core collector:
The default core_collector for raw/ssh dump is:
-"makedumpfile -F -l --message-level 1 -d 31".
+"makedumpfile -F -l --message-level 7 -d 31".
The default core_collector for other targets is:
-"makedumpfile -l --message-level 1 -d 31".
+"makedumpfile -l --message-level 7 -d 31".
Even if core_collector option is commented out in kdump.conf, makedumpfile
is the default core collector and kdump uses it internally.
If one does not want makedumpfile as default core_collector, then they
@@ -307,11 +307,11 @@ Above will effectively be translated to:
cp --sparse=always /proc/vmcore <dest-path>/vmcore
.TP
ex2.
-core_collector "makedumpfile -l --message-level 1 -d 31"
+core_collector "makedumpfile -l --message-level 7 -d 31"
Above will effectively be translated to:
-makedumpfile -l --message-level 1 -d 31 /proc/vmcore <dest-path>/vmcore
+makedumpfile -l --message-level 7 -d 31 /proc/vmcore <dest-path>/vmcore
.PP
For dump targets like raw and ssh, in general, core collector should expect
one argument (source file) and should output the processed core on standard
@@ -328,11 +328,11 @@ Above will effectively be translated to.
cat /proc/vmcore | dd of=<target-device>
.TP
ex4.
-core_collector "makedumpfile -F -l --message-level 1 -d 31"
+core_collector "makedumpfile -F -l --message-level 7 -d 31"
Above will effectively be translated to.
-makedumpfile -F -l --message-level 1 -d 31 | dd of=<target-device>
+makedumpfile -F -l --message-level 7 -d 31 | dd of=<target-device>
.PP
ssh dumps examples
.TP
@@ -344,11 +344,11 @@ Above will effectively be translated to.
cat /proc/vmcore | ssh <options> <remote-location> "dd of=path/vmcore"
.TP
ex6.
-core_collector "makedumpfile -F -l --message-level 1 -d 31"
+core_collector "makedumpfile -F -l --message-level 7 -d 31"
Above will effectively be translated to.
-makedumpfile -F -l --message-level 1 -d 31 | ssh <options> <remote-location> "dd of=path/vmcore"
+makedumpfile -F -l --message-level 7 -d 31 | ssh <options> <remote-location> "dd of=path/vmcore"
There is one exception to standard output rule for ssh dumps. And that is
scp. As scp can handle ssh destinations for file transfers, one can
diff --git a/kexec-kdump-howto.txt b/kexec-kdump-howto.txt
index 2209e5a573d3..7491a7d5b329 100644
--- a/kexec-kdump-howto.txt
+++ b/kexec-kdump-howto.txt
@@ -613,7 +613,7 @@ is a dump filtering and compression utility provided with kexec-tools. On
some architectures, it can drastically reduce the size of your vmcore files,
which becomes very useful on systems with large amounts of memory.
-A typical setup is 'core_collector makedumpfile -F -l --message-level 1 -d 31',
+A typical setup is 'core_collector makedumpfile -F -l --message-level 7 -d 31',
but check the output of '/sbin/makedumpfile --help' for a list of all available
options (-i and -g don't need to be specified, they're automatically taken care
of). Note that use of makedumpfile requires that the kernel-debuginfo package
@@ -633,11 +633,11 @@ First one is source file and second one is target file. For ex.
- ex2.
- core_collector "makedumpfile -l --message-level 1 -d 31"
+ core_collector "makedumpfile -l --message-level 7 -d 31"
Above will effectively be translated to:
- makedumpfile -l --message-level 1 -d 31 /proc/vmcore <dest-path>/vmcore
+ makedumpfile -l --message-level 7 -d 31 /proc/vmcore <dest-path>/vmcore
For dump targets like raw and ssh, in general, core collector should expect
one argument (source file) and should output the processed core on standard
@@ -656,11 +656,11 @@ raw dumps core_collector examples:
- ex4.
- core_collector "makedumpfile -F -l --message-level 1 -d 31"
+ core_collector "makedumpfile -F -l --message-level 7 -d 31"
Above will effectively be translated to.
- makedumpfile -F -l --message-level 1 -d 31 | dd of=<target-device>
+ makedumpfile -F -l --message-level 7 -d 31 | dd of=<target-device>
ssh dumps core_collector examples:
@@ -674,11 +674,11 @@ ssh dumps core_collector examples:
- ex6.
- core_collector "makedumpfile -F -l --message-level 1 -d 31"
+ core_collector "makedumpfile -F -l --message-level 7 -d 31"
Above will effectively be translated to.
- makedumpfile -F -l --message-level 1 -d 31 | ssh <options> <remote-location> "dd of=path/vmcore"
+ makedumpfile -F -l --message-level 7 -d 31 | ssh <options> <remote-location> "dd of=path/vmcore"
There is one exception to standard output rule for ssh dumps. And that is
scp. As scp can handle ssh destinations for file transfers, one can
@@ -696,9 +696,9 @@ About default core collector
----------------------------
Default core_collector for ssh/raw dump is:
-"makedumpfile -F -l --message-level 1 -d 31".
+"makedumpfile -F -l --message-level 7 -d 31".
Default core_collector for other targets is:
-"makedumpfile -l --message-level 1 -d 31".
+"makedumpfile -l --message-level 7 -d 31".
Even if core_collector option is commented out in kdump.conf, makedumpfile
is default core collector and kdump uses it internally.
diff --git a/tests/scripts/testcases/local-kdump/0-local.sh b/tests/scripts/testcases/local-kdump/0-local.sh
index d09c6f0fd6e1..948cfa15def0 100755
--- a/tests/scripts/testcases/local-kdump/0-local.sh
+++ b/tests/scripts/testcases/local-kdump/0-local.sh
@@ -8,7 +8,7 @@ on_test() {
if [ $boot_count -eq 1 ]; then
cat << EOF > /etc/kdump.conf
path /var/crash
-core_collector makedumpfile -l --message-level 1 -d 31
+core_collector makedumpfile -l --message-level 7 -d 31
EOF
kdumpctl start || test_failed "Failed to start kdump"
diff --git a/tests/scripts/testcases/nfs-kdump/1-client.sh b/tests/scripts/testcases/nfs-kdump/1-client.sh
index df6246320d0e..4122bb830598 100755
--- a/tests/scripts/testcases/nfs-kdump/1-client.sh
+++ b/tests/scripts/testcases/nfs-kdump/1-client.sh
@@ -11,7 +11,7 @@ on_test() {
if [ "$boot_count" -eq 1 ]; then
cat << EOF > /etc/kdump.conf
nfs $nfs_server:/srv/nfs
-core_collector makedumpfile -l --message-level 1 -d 31
+core_collector makedumpfile -l --message-level 7 -d 31
EOF
while ! ping -c 1 $nfs_server -W 1; do
diff --git a/tests/scripts/testcases/ssh-kdump/1-client.sh b/tests/scripts/testcases/ssh-kdump/1-client.sh
index d79f00f65376..bd03eff2c4f8 100755
--- a/tests/scripts/testcases/ssh-kdump/1-client.sh
+++ b/tests/scripts/testcases/ssh-kdump/1-client.sh
@@ -11,7 +11,7 @@ on_test() {
if [ "$boot_count" -eq 1 ]; then
cat << EOF > /etc/kdump.conf
ssh root(a)192.168.77.1
-core_collector makedumpfile -l --message-level 1 -d 31 -F
+core_collector makedumpfile -l --message-level 7 -d 31 -F
EOF
ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa <<< y &>/dev/ttyS1
--
2.17.1