diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2018-02-19 13:35:30 -0500 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-05-09 14:23:48 +0100 |
commit | a0410bd3855e261c1b1800be46bc93190e8aae18 (patch) | |
tree | 40ef64f98e0e21a36309d480edbe430c3e86986e | |
parent | 501ac9583c6b5be661593bdcb832f5b1a5097c29 (diff) | |
download | sos-a0410bd3855e261c1b1800be46bc93190e8aae18.tar.gz |
[sunrpc] Simplify enablement check and collect debug information
Simplifies the enablement check to look for the rpcbind package as is
consistent with other plugins and enables the plugin for Debian/Ubuntu.
Also now collects /sys/kernel/debug/sunrpc.
Resolves: #1222
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/sunrpc.py | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/sos/plugins/sunrpc.py b/sos/plugins/sunrpc.py index 686c46e4..df090c14 100644 --- a/sos/plugins/sunrpc.py +++ b/sos/plugins/sunrpc.py @@ -14,42 +14,19 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -from sos.plugins import Plugin, RedHatPlugin +from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin -class SunRPC(Plugin): +class SunRPC(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): """Sun RPC service """ plugin_name = "sunrpc" profiles = ('system', 'storage', 'network', 'nfs') - service = None - - def check_enabled(self): - if self.policy.default_runlevel() in \ - self.policy.runlevel_by_service(self.service): - return True - return False + packages = ('rpcbind',) def setup(self): self.add_cmd_output("rpcinfo -p localhost") - return - - -class RedHatSunRPC(SunRPC, RedHatPlugin): - - service = 'rpcbind' - -# FIXME: depends on addition of runlevel_by_service (or similar) -# in Debian/Ubuntu policy classes -# class DebianSunRPC(SunRPC, DebianPlugin, UbuntuPlugin): -# """Sun RPC related information -# """ -# -# service = 'rpcbind-boot' -# -# def setup(self): -# self.add_cmd_output("rpcinfo -p localhost") -# return + self.add_copy_spec('/sys/kernel/debug/sunrpc') # vim: set et ts=4 sw=4 : |