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__/infiniband.cpython-39.pyc
a

\��h�
�@s&ddlmZmZGdd�dee�ZdS)�)�Plugin�IndependentPluginc@s$eZdZdZdZdZdZdd�ZdS)�
InfinibandzInfiniband informationZ
infiniband)Zhardware)zlibibverbs-utilsZopensmZrdmazinfiniband-diagsc
s�|�gd��|�d�|�gd��gd�}d}|�|�rF|�|�ng}|D�]V}|�d�r`qN|�||d�D�]0}||d|d	}zRt|d
dd��0}|��}|d
kr�Wd�WqrWd�n1s�0YWnty�YqrYn0||d|d}	zXt|	d
dd��4}
|
��}|�d��s@Wd�WqrWd�n1�sV0YWnt�yzYqrYn0d|�d|���|��fdd�|D��qrqNdS)N)z/etc/ofed/openib.confz/etc/ofed/opensm.confz	/etc/rdmaz/var/log/opensm*)Zibv_deviceszibv_devinfo -vZibstatZibstatusZ
ibswitches)ZibhostsZ
iblinkinfoZsminfoZ	perfqueryz/sys/class/infiniband/Zhfiz/portsz/ports/z/link_layer�rzUTF-8)�encodingzInfiniBand
z/statez	: ACTIVE
z-C z -P csg|]}|�d����qS)� �)�.0�c�Zoptsr�A/usr/lib/python3.9/site-packages/sos/report/plugins/infiniband.py�
<listcomp>L�z$Infiniband.setup.<locals>.<listcomp>)	Z
add_copy_specZadd_cmd_outputZ
path_isdir�listdir�
startswith�open�readline�IOError�endswith)�selfZ
ports_cmdsZ	ib_sysdirZib_devsZibdev�portZlfileZlink_fpZ
link_layerZsfileZstate_fp�staterrr�setups8
	

2
4
zInfiniband.setupN)�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackagesrrrrrrs
rN)Zsos.report.pluginsrrrrrrr�<module>s