HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3.9/site-packages/sos/report/plugins/__pycache__/shmcli.cpython-39.opt-1.pyc
a

^��c��@s*ddlmZmZmZGdd�dee�ZdS)�)�Plugin�IndependentPlugin�	PluginOptc@s>eZdZdZdZdZdZdZefZe	dddd	�gZ
d
d�ZdS)
�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)�systemZstorageZhardwarezC/opt/dell/ServerHardwareManager/ServerHardwareManagerCLI/bin/shmcli�debugFzcapture support debug data)�defaultZdesccs|j}gd�}|D]}|jd||fd|d�qg}|�d�}|ddkr�|d��D]:}|��}t|�d	krX|d	��d
krX|�|��d�qXtt	|��}gd�}|j
d
|dd�}|ddk�r�|d��d	d�D]�}|���t�fdd�|D��r܈d}�d}	|D]0}d||||	f}
|
�|d�}|j|
|d��q|�
d�r�|jdd�}d|||	f}
|
�|d�}d|}|j|
||dd�q�|j
d|dd�}|ddk�r|d��D]T}|��}t|�dk�r�|ddv�r�d ||df}
|
�|d�}|j|
|d��q�dS)!N)z
list adapterszlist physical enclosureszlist failed drivesz%s %sz	shmcli_%s)�suggest_filenamez	lsscsi -g�statusr�output�ZDELL�)
z	list emmszlist drawerszlist emm slotszlist drive slotsz	list fanszlist temp sensorszlist voltage sensorszlist current sensorszlist power supplieszinfo enclosurez%s list enclosuresZshmcli_list_enclosures���c3s|]}|�vVqdS)N�)�.0�m��_liner�=/usr/lib/python3.9/site-packages/sos/report/plugins/shmcli.py�	<genexpr>M�zSHMcli.setup.<locals>.<genexpr>���z%s %s -a=%s -enc=%srrF)Zmakez%s getdebugcli -a=%s -enc=%sz -outputdir=%si,)r
�timeoutz%s list drivesZshmcli_list_drives�)ZWWNz---z%s info drive -d=%s)�
shmcli_binZadd_cmd_outputZexec_cmd�
splitlines�split�len�upper�append�list�setZcollect_cmd_output�any�replaceZ
get_optionZget_cmd_output_path)�self�cmdZsubcmdsZsubcmdZmodels�result�line�wordsZadapt_indexZ	enc_indexZ_cmdZ_fnameZlogpathZ_dcmdZ_dnameZ_odirrrr�setup sr
�

�
�
���
�zSHMcli.setupN)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesr�filesrZoption_listr*rrrrrs�rN)Zsos.report.pluginsrrrrrrrr�<module>	s