From d6272e00fff2a600c850a06bf0b6d253a9319757 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 23 Jun 2014 16:22:02 +0100 Subject: [filesys] collect dumpe2fs -h output by default Fixes #297. Signed-off-by: Bryn M. Reeves --- sos/plugins/filesys.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sos/plugins/filesys.py b/sos/plugins/filesys.py index a50c2547..97795567 100644 --- a/sos/plugins/filesys.py +++ b/sos/plugins/filesys.py @@ -45,11 +45,13 @@ class Filesys(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): if self.get_option('lsof'): self.add_cmd_output("lsof -b +M -n -l -P", root_symlink = "lsof") + dumpe2fs_opts = '-h' if self.get_option('dumpe2fs'): - mounts = '/proc/mounts' - ext_fs_regex = r"^(/dev/.+).+ext[234]\s+" - for dev in zip(self.do_regex_find_all(ext_fs_regex, mounts)): - self.add_cmd_output("dumpe2fs -h %s" % (dev)) + dumpe2fs_opts = '' + mounts = '/proc/mounts' + ext_fs_regex = r"^(/dev/.+).+ext[234]\s+" + for dev in self.do_regex_find_all(ext_fs_regex, mounts): + self.add_cmd_output("dumpe2fs %s %s" % (dumpe2fs_opts, dev)) def postproc(self): self.do_file_sub( -- cgit