diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2015-02-11 20:06:59 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2015-02-11 20:06:59 +0000 |
commit | f3ec78df7060c4ac3cead99775f162a9b5d604f7 (patch) | |
tree | 1361c413d2b30fc07ff115b511f4d70b7fb6c7e7 | |
parent | ed50f49e1292b428b3eb63eabb31689aebf70591 (diff) | |
download | sos-f3ec78df7060c4ac3cead99775f162a9b5d604f7.tar.gz |
[kernel] collect directory listings for module updates
Related #490.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/kernel.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py index 6b93ab78..97300e26 100644 --- a/sos/plugins/kernel.py +++ b/sos/plugins/kernel.py @@ -14,6 +14,7 @@ from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin import os +import glob class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): @@ -36,10 +37,21 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): except OSError: self._log_warn("could not list %s" % self.sys_module) + # find /lib/modules/*/{extras,updates,weak-updates} -ls + extra_mod_patterns = [ + "/lib/modules/*/extra", + "/lib/modules/*/updates", + "/lib/modules/*/weak-updates", + ] + extra_mod_paths = [] + for pattern in extra_mod_patterns: + extra_mod_paths.extend(glob.glob(pattern)) + self.add_cmd_output([ "dmesg", "sysctl -a", - "dkms status" + "dkms status", + "find %s -ls" % " ".join(extra_mod_paths) ]) self.add_copy_spec([ |