aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-04-30 15:51:33 +0100
committerBryn M. Reeves <bmr@redhat.com>2013-04-30 15:51:33 +0100
commit5df81ba19765fa59999300bb4e405a7714ec0ec2 (patch)
treee4bf37300a4aa0d7b6f1604296c106bca940b3f2
parentdc75f25ab80a036f9a9fd348669174208ece98d6 (diff)
downloadsos-5df81ba19765fa59999300bb4e405a7714ec0ec2.tar.gz
Add partition data to block plug-in and tidy blkid code
Collect /proc/partitions in the block plug-in where it belongs (not in the cluster or file system plug-ins where it has hidden in the past!). Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/block.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/sos/plugins/block.py b/sos/plugins/block.py
index f54f6fd6..044345b3 100644
--- a/sos/plugins/block.py
+++ b/sos/plugins/block.py
@@ -22,14 +22,17 @@ class Block(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
plugin_name = 'block'
def setup(self):
- # legacy location for non-/run distributions
- self.add_copy_spec("/etc/blkid.tab")
- self.add_copy_spec("/run/blkid/blkid.tab")
+ self.add_copy_spec("/proc/partitions")
+
self.add_cmd_output("lsblk")
self.add_cmd_output("blkid -c /dev/null")
self.add_cmd_output("ls -lanR /dev")
self.add_cmd_output("ls -lanR /sys/block")
+ # legacy location for non-/run distributions
+ self.add_copy_spec("/etc/blkid.tab")
+ self.add_copy_spec("/run/blkid/blkid.tab")
+
if os.path.isdir("/sys/block"):
for disk in os.listdir("/sys/block"):
if disk in [ ".", ".." ] or disk.startswith("ram"):