From fb2258183a527fe89756fc499571fdcc3bb2486e Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Tue, 30 Apr 2013 18:14:21 +0100 Subject: Move dmesg collection from general to kernel The kernel ring buffer is certainly more 'kernel' than 'general'. Put it where it belongs and remove the duplicate dmesg call and 'dmesg_now' suggested filename (there's no need as it's in a separate directory to the saved version at var/log/dmesg and the normal action of dmesg is to print the current content). Signed-off-by: Bryn M. Reeves --- sos/plugins/general.py | 4 ---- sos/plugins/kernel.py | 8 ++++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sos/plugins/general.py b/sos/plugins/general.py index 557e7db9..8728c064 100644 --- a/sos/plugins/general.py +++ b/sos/plugins/general.py @@ -31,7 +31,6 @@ class General(Plugin): "/etc/sos.conf", "/etc/sysconfig", "/proc/stat", - "/var/log/dmesg", "/var/log/sa", "/var/log/pm/suspend.log", "/var/log/up2date", @@ -42,14 +41,12 @@ class General(Plugin): "/root/anaconda-ks.cfg"]) limit = self.get_option("syslogsize") - self.add_cmd_output("dmesg", suggest_filename="dmesg_now") self.add_copy_spec_limit("/var/log/messages*", sizelimit = limit) self.add_copy_spec_limit("/var/log/secure*", sizelimit = limit) self.add_cmd_output("hostid") self.add_cmd_output("hostname", root_symlink="hostname") self.add_cmd_output("date", root_symlink="date") self.add_cmd_output("uptime", root_symlink="uptime") - self.add_cmd_output("dmesg") self.add_cmd_output("alternatives --display java", root_symlink="java") self.add_cmd_output("readlink -f /usr/bin/java") @@ -113,7 +110,6 @@ class UbuntuGeneral(General, UbuntuPlugin): "/var/log/syslog", "/var/log/udev", "/var/log/boot*", - "/var/log/dmesg*", "/var/log/kern*", "/var/log/mail*", "/var/log/dist-upgrade", diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py index 8ebe8382..1afe9dff 100644 --- a/sos/plugins/kernel.py +++ b/sos/plugins/kernel.py @@ -33,8 +33,10 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): self.add_cmd_output("modinfo " + " ".join(modules)) except OSError: self.soslog.error("could not list %s" % self.sys_module) - + + self.add_cmd_output("dmesg") self.add_cmd_output("sysctl -a") + self.add_copy_specs([ "/proc/modules", "/proc/sys/kernel/random/boot_id", @@ -59,6 +61,8 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): "/proc/sys/kernel/tainted", "/proc/softirqs", "/proc/timer*", - "/proc/lock*"]) + "/proc/lock*", + "/var/log/dmesg" + ]) self.add_cmd_output("dkms status") -- cgit