From 8a4299e5f664a74ff72308d8c9090378614c59d5 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Wed, 7 Mar 2012 09:20:00 +0000 Subject: Collect additional diagnostic information for realtime systems Resolves: bz789096 --- sos/plugins/kernel.py | 5 +++++ sos/plugins/kernel_realtime.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 sos/plugins/kernel_realtime.py diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py index a4d20677..ec0090d7 100644 --- a/sos/plugins/kernel.py +++ b/sos/plugins/kernel.py @@ -72,6 +72,11 @@ class kernel(sos.plugintools.PluginBase): self.addCopySpec("/proc/zoneinfo") self.addCopySpec("/proc/sys/kernel/tainted") self.addCopySpec("/proc/buddyinfo") + self.addCopySpec("/proc/softirqs") + self.addCopySpec("/proc/timer*") + self.addCopySpec("/proc/lock*") + self.addCopySpec("/sys/devices/system/clocksource/clocksource0/available_clocksource") + self.addCopySpec("/sys/devices/system/clocksource/clocksource0/current_clocksource") return diff --git a/sos/plugins/kernel_realtime.py b/sos/plugins/kernel_realtime.py new file mode 100644 index 00000000..58ce85d3 --- /dev/null +++ b/sos/plugins/kernel_realtime.py @@ -0,0 +1,32 @@ +# Copyright 2012 Red Hat Inc. +# Guy Streeter +# Bryn M. Reeves +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; version 2. +# +# This application is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +import sos.plugintools +import os + +class kernel_realtime(sos.plugintools.PluginBase): + '''Information specific to the realtime kernel + ''' + + def checkenabled(self): + if os.path.exists('/sys/kernel/realtime'): + return True + return False + + def setup(self): + self.addCopySpec('/etc/rtgroups') + self.addCopySpec('/proc/sys/kernel/sched_rt_period_us') + self.addCopySpec('/proc/sys/kernel/sched_rt_runtime_us') + self.addCopySpec('/sys/kernel/realtime') + if self.isInstalled('tuna'): + self.collectExtOutput('/usr/bin/tuna -CP') -- cgit