HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/shmcli.cpython-310.pyc
o

-�_g��@s*ddlmZmZmZGdd�dee�ZdS)�)�Plugin�IndependentPlugin�	PluginOptc@sNeZdZdZdZdZdZdZefZe	dddd	�gZ
d
d�Zdd
�Zdd�Z
dS)�SHMcliashmcli pulls hardware information from PowerVault/Dell
    Storage JBOD's attached to server.
    It provides information of the adapters, emms, drives,
    enclosures, fans, power supplies and the sensory data of
    temp, voltage, and current sensors.
    zDell Server Hardware Manager�shmcli)�system�storage�hardwarezC/opt/dell/ServerHardwareManager/ServerHardwareManagerCLI/bin/shmcli�debugFzcapture support debug data)�default�desccCsFgd�}|D]}|j|j�d|��d|��d�q|��|��dS)N)z
list adapterszlist physical enclosureszlist failed drives� �shmcli_��suggest_filename)�add_cmd_output�
shmcli_bin�collect_enclosures_list�collect_drivers_list)�self�subcmds�subcmd�r�;/usr/lib/python3/dist-packages/sos/report/plugins/shmcli.py�setup s�zSHMcli.setupc	s�g}|�d�}|ddkr1|d��D]����}t|�dkr0|d��dkr0|����d�qtt|��}gd�}|j|j	�d	�d
d�}|ddkr�|d��dd�D]h�����t
�fd
d�|D��r��d}�d}|D]}|j	�d|�d|�d|��}|�|j	d�}	|j||	d�qq|�
d�r�|jdd�}
|j	�d|�d|��}|�|j	d�}d|
��}
|j||
|dd�qVdSdS)z  Collect info on the enclosures z	lsscsi -g�statusr�output��DELL�)
z	list emmszlist drawerszlist emm slotszlist drive slotsz	list fanszlist temp sensorszlist voltage sensorszlist current sensorszlist power supplieszinfo enclosurez list enclosures�shmcli_list_enclosuresr���c3s�|]}|�vVqdS)Nr)�.0�m��linerr�	<genexpr>Qs�z1SHMcli.collect_enclosures_list.<locals>.<genexpr>���r
z -a=z -enc=rr
F)�makez getdebugcli -a=z -outputdir=i,)r�timeoutN)�exec_cmd�
splitlines�split�len�upper�append�list�set�collect_cmd_outputr�any�replacer�
get_option�get_cmd_output_path)r�models�result�wordsr�adapt_index�	enc_indexr�_cmd�_fname�logpath�_dcmd�_dname�_odirrr$rr0sT
�
��
��
���zSHMcli.collect_enclosures_listcCs�|j|j�d�dd�}|ddkrB|d��D],}|��}t|�dkrA|ddvrA|j�d	|d��}|�|jd
�}|j||d�qdSdS)z Collect info on the drives z list drives�shmcli_list_drivesrrrr�)�WWNz---z info drive -d=rN)r2rr+r,r-r4r)rr8r%r9r<r=rrrrds
���zSHMcli.collect_drivers_listN)�__name__�
__module__�__qualname__�__doc__�
short_desc�plugin_name�profilesr�filesr�option_listrrrrrrrrs�4rN)�sos.report.pluginsrrrrrrrr�<module>s