aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-04-04 23:23:47 +0100
committerBryn M. Reeves <bmr@redhat.com>2014-04-04 23:23:47 +0100
commit997b071b1b2ca623a5994223f18d786fa9cca21e (patch)
tree762f357a3a5870a23957ef529b1882b9ea4a4ea5
parentd0ec8654198bf1faa97b1b420645ab150fa6eef8 (diff)
downloadsos-997b071b1b2ca623a5994223f18d786fa9cca21e.tar.gz
Convert PowerPC plugin to use add_copy_specs()
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/powerpc.py34
1 files changed, 20 insertions, 14 deletions
diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py
index 11ce56dd..7b73e55d 100644
--- a/sos/plugins/powerpc.py
+++ b/sos/plugins/powerpc.py
@@ -38,14 +38,17 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin):
isPowerNV = False
if ispSeries or isPowerNV:
- self.add_copy_spec("/proc/device-tree/")
- self.add_copy_spec("/proc/loadavg")
- self.add_copy_spec("/proc/locks")
- self.add_copy_spec("/proc/misc")
- self.add_copy_spec("/proc/swaps")
- self.add_copy_spec("/proc/version")
- self.add_copy_spec("/dev/nvram")
- self.add_copy_spec("/var/log/platform")
+ self.add_copy_specs([
+ "/proc/device-tree/")
+ "/proc/loadavg",
+ "/proc/locks",
+ "/proc/misc",
+ "/proc/swaps",
+ "/proc/version",
+ "/dev/nvram",
+ "/var/log/platform",
+ "/var/lib/lsvpd/"
+ ])
self.add_cmd_output("ppc64_cpu --smt")
self.add_cmd_output("ppc64_cpu --cores-present")
self.add_cmd_output("ppc64_cpu --cores-on")
@@ -55,12 +58,13 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin):
self.add_cmd_output("lscfg -vp")
self.add_cmd_output("lsmcode -A")
self.add_cmd_output("lsvpd --debug")
- self.add_copy_spec("/var/lib/lsvpd/")
if ispSeries:
- self.add_copy_spec("/proc/ppc64/lparcfg")
- self.add_copy_spec("/proc/ppc64/eeh")
- self.add_copy_spec("/proc/ppc64/systemcfg")
+ self.add_copy_specs([
+ "/proc/ppc64/lparcfg")
+ "/proc/ppc64/eeh",
+ "/proc/ppc64/systemcfg"
+ ])
self.add_cmd_output("lsvio -des")
self.add_cmd_output("servicelog --dump")
self.add_cmd_output("servicelog_notify --list")
@@ -71,8 +75,10 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin):
self.add_cmd_output("lparstat -i")
if isPowerNV:
- self.add_copy_spec("/proc/ppc64/")
- self.add_copy_spec("/sys/kernel/debug/powerpc/")
+ self.add_copy_specs([
+ "/proc/ppc64/",
+ "/sys/kernel/debug/powerpc/"
+ ])
if os.path.isdir("/var/log/dump"):
self.add_cmd_output("ls -l /var/log/dump")