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