aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2022-03-21 13:27:18 -0400
committerJake Hunsaker <jhunsake@redhat.com>2022-03-22 12:57:10 -0400
commit298e1ec1f2b590bd55feb1a0019f49eb14368575 (patch)
tree226bae39a719977a84f0109d460476f26ccf4379
parent39ef994a18d7754da2ed09cc996a32ef52a8d404 (diff)
downloadsos-298e1ec1f2b590bd55feb1a0019f49eb14368575.tar.gz
[scsi] Add collection of SCSI persistent reserve commands
Adds collection of various `sq_persist` and `sg_inq` commands to the `scsi` plugin for scsi block devices on the host system. Also adds a docstring description to the plugin to assist with `sos help` output. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/scsi.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/sos/report/plugins/scsi.py b/sos/report/plugins/scsi.py
index 28d1396c..363fc8a4 100644
--- a/sos/report/plugins/scsi.py
+++ b/sos/report/plugins/scsi.py
@@ -11,6 +11,17 @@ from sos.report.plugins import Plugin, IndependentPlugin
class Scsi(Plugin, IndependentPlugin):
+ """
+ Collects various information about the SCSI devices install on the host
+ system.
+
+ This plugin will capture a large amount of data from the /sys filesystem,
+ as well as several different invocations of the `lsscsi` command.
+
+ Additionally, several `sg_persist` commands will be collected for each
+ SCSI device identified by sos. Note that in most cases these commands are
+ provided by the `sg3_utils` package which may not be present by default.
+ """
short_desc = 'SCSI devices'
@@ -46,4 +57,11 @@ class Scsi(Plugin, IndependentPlugin):
self.add_blockdev_cmd("udevadm info -a %(dev)s", devices=scsi_hosts,
prepend_path='/sys/class/scsi_host')
+ self.add_blockdev_cmd([
+ "sg_persist --in -k -d %(dev)s",
+ "sg_persist --in -r -d %(dev)s",
+ "sg_persist --in -s -d %(dev)s",
+ "sg_inq %(dev)s"
+ ], whitelist=['sd.*'])
+
# vim: set et ts=4 sw=4 :