o id @s2ddlmZddlmZmZGdddeeZdS))glob)PluginIndependentPluginc@s$eZdZdZdZdZdZddZdS)Scsia 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. z SCSI devicesscsi)storagehardwarecCs|gddg}|d}|ddkr3|dD]}|d|vr2|d}|d |q|jd d d d |gd td}|jd|d|jgdddgddS)N)z /proc/scsiz/etc/stinit.defz /sys/bus/scsiz/sys/class/scsi_hostz/sys/class/scsi_diskz/sys/class/scsi_devicez/sys/class/scsi_genericenclosuz lsscsi -gstatusroutputzsg_ses -p2 -b1 %sz lsscsi -ilsscsi)suggest_filenametags)z sg_map -xlspathz lsmap -alllsnportsz lsscsi -Hz lsscsi -dz lsscsi -sz lsscsi -Lz/sys/class/scsi_host/*zudevadm info -a %(dev)s)devices)zsg_persist --in -k -d %(dev)szsg_persist --in -r -d %(dev)szsg_persist --in -s -d %(dev)szsg_inq %(dev)sblockzsd.*)r whitelist) add_copy_speccollect_cmd_output splitlinessplitadd_cmd_outputradd_device_cmd)self scsi_typesresultlinedevsg scsi_hostsr"9/usr/lib/python3/dist-packages/sos/report/plugins/scsi.pysetups$      z Scsi.setupN)__name__ __module__ __qualname____doc__ short_desc plugin_nameprofilesr$r"r"r"r#r s   rN)rsos.report.pluginsrrrr"r"r"r#s