aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2019-02-24 15:48:24 -0500
committerBryn M. Reeves <bmr@redhat.com>2019-03-21 12:01:09 +0000
commit806dc212637e48d1367720b1eb4c06806612843c (patch)
treeef4aa0565d85e91ea39573236929db85cc882157
parentb2eb42254da24eab0fec5448e98d6fbbe702fb2d (diff)
downloadsos-806dc212637e48d1367720b1eb4c06806612843c.tar.gz
[nvme] Adjust per-device command collection
Removes 'nvme list' from repeated collection, instead only capturing it once and further collection 'nvme list-subsys'. Additionally adds per-device collection of smartctl output for further SMART information than what is provided by smart-log, and get-ns-id. Resolves: #1576 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/nvme.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/sos/plugins/nvme.py b/sos/plugins/nvme.py
index d4be7fbf..6e2cda73 100644
--- a/sos/plugins/nvme.py
+++ b/sos/plugins/nvme.py
@@ -21,18 +21,24 @@ class Nvme(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
return [dev for dev in sys_block if dev.startswith('nvme')]
def setup(self):
+ self.add_cmd_output([
+ "nvme list",
+ "nvme list-subsys",
+ ])
for dev in self.get_nvme_devices():
# runs nvme-cli commands
self.add_cmd_output([
- "nvme list",
- "nvme list-ns /dev/%s" % dev,
- "nvme fw-log /dev/%s" % dev,
- "nvme list-ctrl /dev/%s" % dev,
- "nvme id-ctrl -H /dev/%s" % dev,
- "nvme id-ns -H /dev/%s" % dev,
- "nvme smart-log /dev/%s" % dev,
- "nvme error-log /dev/%s" % dev,
- "nvme show-regs /dev/%s" % dev])
+ "smartctl --all /dev/%s" % dev,
+ "nvme list-ns /dev/%s" % dev,
+ "nvme fw-log /dev/%s" % dev,
+ "nvme list-ctrl /dev/%s" % dev,
+ "nvme id-ctrl -H /dev/%s" % dev,
+ "nvme id-ns -H /dev/%s" % dev,
+ "nvme smart-log /dev/%s" % dev,
+ "nvme error-log /dev/%s" % dev,
+ "nvme show-regs /dev/%s" % dev,
+ "nvme get-ns-id /dev/%s" % dev
+ ])
self.add_copy_spec("/etc/nvme/discovery.conf")
# vim: set et ts=4 sw=4 :