aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-04-26 17:03:32 +0100
committerBryn M. Reeves <bmr@redhat.com>2013-04-26 17:03:32 +0100
commit868acaf16b2f9e4eea0f207cde996bd3fd5a2b27 (patch)
tree94101a7eb57f3a3142a3f43e2c47993884f8728d
parentbda1585bc594aadd51329b5f2f4d0de08ad50f4b (diff)
downloadsos-868acaf16b2f9e4eea0f207cde996bd3fd5a2b27.tar.gz
Fix detection of ext file systems in filesys plug-in
The code to collect dumpe2fs output does not work on modern systems due to changes in the output of the mount command. Have the plug-in use /proc/mounts instead and simplify and improve the regex used to find devices containing ext[234] file systems and switch to 'dumpe2fs -h' collection rather than getting the full group lists. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/filesys.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/sos/plugins/filesys.py b/sos/plugins/filesys.py
index 06be7058..1f06e981 100644
--- a/sos/plugins/filesys.py
+++ b/sos/plugins/filesys.py
@@ -35,7 +35,7 @@ class Filesys(Plugin, RedHatPlugin, UbuntuPlugin):
"/proc/mdstat",
"/etc/raidtab",
"/etc/mdadm.conf"])
- mounts = self.get_cmd_output_now("mount -l", root_symlink = "mount")
+ self.get_cmd_output_now("mount -l", root_symlink = "mount")
self.add_cmd_output("findmnt")
self.add_cmd_output("df -al", root_symlink = "df")
@@ -75,5 +75,7 @@ class Filesys(Plugin, RedHatPlugin, UbuntuPlugin):
self.add_cmd_output("parted -s %s print" % (i))
if self.get_option('dumpe2fs'):
- for extfs in izip(self.do_regex_find_all(r"^(/dev/.+) on .+ type ext.\s+", mounts)):
- self.add_cmd_output("dumpe2fs %s" % (extfs))
+ mounts = '/proc/mounts'
+ ext_fs_regex = r"^(/dev/.+).+ext[234]\s+"
+ for dev in izip(self.do_regex_find_all(ext_fs_regex, mounts)):
+ self.add_cmd_output("dumpe2fs -h %s" % (dev))