diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2013-04-30 18:14:21 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2013-04-30 18:14:21 +0100 |
commit | fb2258183a527fe89756fc499571fdcc3bb2486e (patch) | |
tree | 836c9213fc7e8b1cc4542318144c109d72fde7dc | |
parent | 26b1ee34f3392bf07aa2062daf57ffe31629bf0f (diff) | |
download | sos-fb2258183a527fe89756fc499571fdcc3bb2486e.tar.gz |
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 <bmr@redhat.com>
-rw-r--r-- | sos/plugins/general.py | 4 | ||||
-rw-r--r-- | 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") |