diff options
author | Adrien Mahieux <adrien@mahieux.net> | 2017-04-18 14:38:08 +0200 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-03-13 13:18:55 +0000 |
commit | c8a5039053cb6bc13518e0b249f37de290d317a7 (patch) | |
tree | 7e4d99604907fc0991a9bb11af5fa390adbb6203 | |
parent | 9d3c5251df377a1d63f2bd0774d79f1f5a229973 (diff) | |
download | sos-c8a5039053cb6bc13518e0b249f37de290d317a7.tar.gz |
[filesys] Add reporting of ext fragmentation with e2freefrag
Fixes: #992
Signed-off-by: Adrien Mahieux <adrien@mahieux.net>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/filesys.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sos/plugins/filesys.py b/sos/plugins/filesys.py index c48293ab..53ca17e1 100644 --- a/sos/plugins/filesys.py +++ b/sos/plugins/filesys.py @@ -22,9 +22,11 @@ class Filesys(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): plugin_name = 'filesys' profiles = ('storage',) - option_list = [("lsof", 'gathers information on all open files', 'slow', - False), - ("dumpe2fs", 'dump filesystem information', 'slow', False)] + option_list = [ + ("lsof", 'gathers information on all open files', 'slow', False), + ("dumpe2fs", 'dump filesystem information', 'slow', False), + ("frag", 'filesystem fragmentation status', 'slow', False) + ] def setup(self): self.add_copy_spec([ @@ -53,6 +55,9 @@ class Filesys(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): for dev in self.do_regex_find_all(ext_fs_regex, mounts): self.add_cmd_output("dumpe2fs %s %s" % (dumpe2fs_opts, dev)) + if self.get_option('frag'): + self.add_cmd_output("e2freefrag %s" % (dev)) + def postproc(self): self.do_file_sub( "/etc/fstab", |