| Server IP : 3.111.61.48 / Your IP : 216.73.216.67 Web Server : Apache System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.2.31 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/sos/report/plugins/__pycache__/ |
Upload File : |
o
G%@i� � @ s* d dl mZmZmZ G dd� dee�ZdS )� )�Plugin�IndependentPlugin� PluginOptc @ sN e Zd ZdZdZdZdZdZefZe dddd �gZ
d
d� Zdd
� Zdd� Z
dS )�SHMclia shmcli 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�descc C sF g d�}|D ]}| j | j� d|� �d|� �d� q| �� | �� d S )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 �zSHMcli.setupc s� g }| � d�}|d dkr1|d �� D ]� � �� }t|�dkr0|d �� dkr0|�� �� d � qtt|��}g d�}| j| j � d �d
d�}|d dkr�|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� qVdS dS )z Collect info on the enclosures z lsscsi -g�statusr �output� �DELL� )
z list emmszlist drawerszlist emm slotszlist drive slotsz list fanszlist temp sensorszlist voltage sensorszlist current sensorszlist power supplieszinfo enclosurez list enclosures�shmcli_list_enclosuresr ���c 3 s � | ]}|� v V qd S )Nr )�.0�m��liner r � <genexpr>Q s � z1SHMcli.collect_enclosures_list.<locals>.<genexpr>���r
z -a=z -enc=r r
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�_odirr r$ r r 0 sT
�
��
��
���zSHMcli.collect_enclosures_listc C s� | j | j� d�dd�}|d dkrB|d �� D ],}|�� }t|�dkrA|d dvrA| j� d |d � �}|�| jd
�}| j||d� qdS dS )z Collect info on the drives z list drives�shmcli_list_drivesr r r r � )�WWNz---z info drive -d=r N)r2 r r+ r, r- r4 r )r r8 r% r9 r<