sos/0048-Clean-up-package-checks-in-processor-plugin.patch
Bryn M. Reeves 5261563507 Update sos to 3.1
Update sos to the 3.1 upstream release and add post-release patches
from the development tree.
2014-04-01 12:25:00 +01:00

53 lines
1.7 KiB
Diff

From 426549369f818091935712936514382786502094 Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Thu, 27 Mar 2014 11:50:33 +0000
Subject: [PATCH 48/61] Clean up package checks in processor plugin
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/plugins/processor.py | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/sos/plugins/processor.py b/sos/plugins/processor.py
index 391c64f..0b236f8 100644
--- a/sos/plugins/processor.py
+++ b/sos/plugins/processor.py
@@ -21,6 +21,8 @@ class Processor(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin):
"""
plugin_name = 'processor'
+ files = ('/proc/cpuinfo',)
+ packages = ('cpufreq-utils')
def setup(self):
self.add_copy_specs([
@@ -29,21 +31,13 @@ class Processor(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin):
"/sys/devices/system/cpu"
])
- if self.policy().pkg_by_name("cpufreq-utils"):
- self.add_cmd_output("cpufreq-info")
- self.add_cmd_output("cpupower info")
- self.add_cmd_output("cpupower frequency-info")
-
- if self.policy().pkg_by_name("kernel-tools"):
- self.add_cmd_output("cpupower info")
- self.add_cmd_output("cpupower frequency-info")
- self.add_cmd_output("cpupower idle-info")
+ self.add_cmd_output("lscpu")
+ self.add_cmd_output("cpupower info")
+ self.add_cmd_output("cpupower idle-info")
+ self.add_cmd_output("cpupower frequency-info")
if self.policy().get_arch().endswith("386"):
self.add_cmd_output("x86info -a")
- self.add_cmd_output("lscpu")
-
-
# vim: et ts=4 sw=4
--
1.7.11.7