commit 1b3fc3f029ed3ab1dcbfeaaaa8fe1616dbc3744f Author: Bryn M. Reeves Date: Tue Jul 30 19:30:13 2013 +0100 Add restricted rpm verify Add a default call to rpm -V/--verify for a targeted subset of packages. This greatly reduces the time taken relative to rpm -Va while still capturing important diagnostic information. In future this capability could be made a feature of the PackageManager class interface and available to all ports/modules. Signed-off-by: Bryn M. Reeves diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py index 9d44fde..a315018 100644 --- a/sos/plugins/rpm.py +++ b/sos/plugins/rpm.py @@ -23,6 +23,8 @@ class Rpm(Plugin, RedHatPlugin): option_list = [("rpmq", "queries for package information via rpm -q", "fast", True), ("rpmva", "runs a verify on all packages", "slow", False)] + verify_list = [ 'kernel', 'glibc', 'pam_.*' ] + def setup(self): self.add_copy_spec("/var/log/rpmpkgs") @@ -36,3 +38,9 @@ class Rpm(Plugin, RedHatPlugin): if self.get_option("rpmva"): self.add_cmd_output("rpm -Va", root_symlink = "rpm-Va", timeout = 3600) + else: + pkgs_by_regex = self.policy().package_manager.all_pkgs_by_name_regex + verify_list = map(pkgs_by_regex, self.verify_list) + for pkg_list in verify_list: + for pkg in pkg_list: + self.add_cmd_output("rpm -V %s" % pkg) commit 1a73d5932a3f8153a9d1440c931823720e7e6245 Author: Bryn M. Reeves Date: Tue Aug 13 21:54:27 2013 +0100 Add new patterns to the RPM plug-in verify list Signed-off-by: Bryn M. Reeves diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py index a315018..71f36a0 100644 --- a/sos/plugins/rpm.py +++ b/sos/plugins/rpm.py @@ -23,7 +23,13 @@ class Rpm(Plugin, RedHatPlugin): option_list = [("rpmq", "queries for package information via rpm -q", "fast", True), ("rpmva", "runs a verify on all packages", "slow", False)] - verify_list = [ 'kernel', 'glibc', 'pam_.*' ] + verify_list = [ + 'kernel', 'glibc', 'initscripts', + 'pam_.*', + 'java.*', 'perl.*', + 'rpm', 'yum', + 'spacewalk.*', + ] def setup(self): self.add_copy_spec("/var/log/rpmpkgs") commit ffcde57daa6f6cbbfd9cb588ab64eb485d07d9ca Author: Bryn M. Reeves Date: Wed Oct 16 19:12:58 2013 +0100 Verify fewer packages in rpm plug-in The current default set of packages to verify includes debuginfo and devel subpackages. Filter these out to reduce the time spent running rpm -V. Signed-off-by: Bryn M. Reeves diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py index 71f36a0..55c8019 100644 --- a/sos/plugins/rpm.py +++ b/sos/plugins/rpm.py @@ -24,7 +24,7 @@ class Rpm(Plugin, RedHatPlugin): ("rpmva", "runs a verify on all packages", "slow", False)] verify_list = [ - 'kernel', 'glibc', 'initscripts', + 'kernel$', 'glibc', 'initscripts', 'pam_.*', 'java.*', 'perl.*', 'rpm', 'yum', @@ -49,4 +49,7 @@ class Rpm(Plugin, RedHatPlugin): verify_list = map(pkgs_by_regex, self.verify_list) for pkg_list in verify_list: for pkg in pkg_list: + if 'debuginfo' in pkg \ + or pkg.endswith('-debuginfo-common'): + continue self.add_cmd_output("rpm -V %s" % pkg)