diff options
author | Peter Portante <peter.portante@redhat.com> | 2015-06-18 14:13:35 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2015-07-08 18:24:59 +0100 |
commit | b0c3b9e32072bc940e66d66d07b1c12edf58e106 (patch) | |
tree | 22a862513ff883dacb02eb99b5a89bf2032bfabe | |
parent | 76c04a773f1927359d264f59e4fbcc9363424882 (diff) | |
download | sos-b0c3b9e32072bc940e66d66d07b1c12edf58e106.tar.gz |
[kernel, kernelrt] Collect clock source for all kernels
Resolves #580.
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/kernel.py | 5 | ||||
-rw-r--r-- | sos/plugins/kernelrt.py | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py index 28c5955a..791be9ca 100644 --- a/sos/plugins/kernel.py +++ b/sos/plugins/kernel.py @@ -54,6 +54,7 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): "find %s -ls" % " ".join(extra_mod_paths) ]) + clocksource_path = "/sys/devices/system/clocksource/clocksource0/" self.add_copy_spec([ "/proc/modules", "/proc/sys/kernel/random/boot_id", @@ -81,7 +82,9 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): "/proc/timer*", "/proc/lock*", "/proc/misc", - "/var/log/dmesg" + "/var/log/dmesg", + clocksource_path + "available_clocksource", + clocksource_path + "current_clocksource" ]) # vim: set et ts=4 sw=4 : diff --git a/sos/plugins/kernelrt.py b/sos/plugins/kernelrt.py index 52f8e173..7113535b 100644 --- a/sos/plugins/kernelrt.py +++ b/sos/plugins/kernelrt.py @@ -29,14 +29,14 @@ class KernelRT(Plugin, RedHatPlugin): files = ('/sys/kernel/realtime',) def setup(self): + clocksource_path = '/sys/devices/system/clocksource/clocksource0/' self.add_copy_spec([ '/etc/rtgroups', '/proc/sys/kernel/sched_rt_period_us', '/proc/sys/kernel/sched_rt_runtime_us', '/sys/kernel/realtime', - '/sys/devices/system/clocksource/clocksource0/' - 'available_clocksource', - '/sys/devices/system/clocksource/clocksource0/current_clocksource' + clocksource_path + 'available_clocksource', + clocksource_path + 'current_clocksource' ]) # note: rhbz#1059685 'tuna - NameError: global name 'cgroups' is not # defined this command throws an exception on versions prior to |