From 83d56e2b443edc733ffc5a5286ce8392de99586e Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Mon, 11 May 2020 14:22:18 +0200 Subject: [PATCH] [nvmetcli] Add new plugin for NVMe Target CLI Resolves: #2056 Signed-off-by: Pavel Moravec Signed-off-by: Jake Hunsaker --- sos/plugins/nvmetcli.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sos/plugins/nvmetcli.py diff --git a/sos/plugins/nvmetcli.py b/sos/plugins/nvmetcli.py new file mode 100644 index 00000000..b66a3a13 --- /dev/null +++ b/sos/plugins/nvmetcli.py @@ -0,0 +1,32 @@ +# Copyright (C) 2020 Red Hat, Inc., Nitin Yewale + +# This file is part of the sos project: https://github.com/sosreport/sos +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions of +# version 2 of the GNU General Public License. +# +# See the LICENSE file in the source distribution for further information. + +from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin + + +class NvmetCli(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + + short_desc = 'Collect config and system information for nvmetcli' + + packages = ('nvmetcli', ) + profiles = ('storage', ) + plugin_name = 'nvmetcli' + + def setup(self): + self.add_cmd_output([ + "nvmetcli ls" + ]) + self.add_journal(units=["nvme", "nvmet", "nvmet_rdma"]) + self.add_copy_spec([ + "/sys/kernel/config/nvmet", + "/etc/nvmet/config.json", + ]) + +# vim: set et ts=4 sw=4 : -- diff --git a/sos/plugins/nvmetcli.py b/sos/plugins/nvmetcli.py --- a/sos/plugins/nvmetcli.py +++ b/sos/plugins/nvmetcli.py @@ -12,6 +12,8 @@ from sos.plugins import Plugin, RedHatPl class NvmetCli(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + """Collect config and system information for nvmetcli + """ short_desc = 'Collect config and system information for nvmetcli' -- 2.21.3