HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python3.9/site-packages/sos/report/plugins/__pycache__/scsi.cpython-39.opt-1.pyc
a

\��h�	�@s2ddlmZddlmZmZGdd�dee�ZdS)�)�glob)�Plugin�IndependentPluginc@s$eZdZdZdZdZdZdd�ZdS)�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 devicesZscsi)ZstorageZhardwarecCs�|�gd��dg}|�d�}|ddkrh|d��D]0}|��d|vr6|��d}|�d	|���q6|jd
ddd�|�gd
��td�}|jd|d�|jgd�ddgd�dS)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_genericZenclosuz	lsscsi -g�statusr�output����zsg_ses -p2 -b1 z	lsscsi -iZlsscsi)Zsuggest_filename�tags)
z	sg_map -xZlspathz
lsmap -allZlsnportsz	lsscsi -Hz	lsscsi -dz	lsscsi -sz	lsscsi -Lz
lsscsi -iwz	lsscsi -tz/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)s�blockzsd.*)rZ	whitelist)Z
add_copy_specZcollect_cmd_output�
splitlines�splitZadd_cmd_outputrZadd_device_cmd)�selfZ
scsi_types�result�lineZdevsgZ
scsi_hosts�r�;/usr/lib/python3.9/site-packages/sos/report/plugins/scsi.py�setups"

�

�z
Scsi.setupN)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesrrrrrr
s
rN)rZsos.report.pluginsrrrrrrr�<module>	s