Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/sos/report/plugins/__pycache__/ |
Upload File : |
o -�_g� � @ s6 d dl Z d dlZd dlmZmZ G dd� dee�ZdS )� N)�Plugin�IndependentPluginc @ s8 e Zd ZdZdZdZdZdZdd� Zdd � Z d d� Z dS ) �MellanoxFirmwarez&Nvidia(Mellanox) firmware tools output�mellanox_firmware)�hardware�system)�mst�mstflintzMellanox Technologiesc C s$ | � d�}|d dko| j|d v S )z� Checks if this plugin should be executed at all. We will only enable the plugin if there is a Mellanox Technologies network adapter �lspci -D -d 15b3::0200�statusr �output)�exec_cmd�MLNX_STRING)�self�lspci� r �F/usr/lib/python3/dist-packages/sos/report/plugins/mellanox_firmware.py� check_enabled s zMellanoxFirmware.check_enabledc C s� | � d�s| �d� d S | �d�}|d dkrd S | �d�}|d dkr&d S | �d� | jdd d � | jdd d � t�d�}g }|D ]}d |v rM|�|� qB|D ]}| jd|� d�d d � | jd|� d�d d � qP| jddd� d S )N�allow_system_changesztSkipping mst/mlx cable commands as system changeswould be made. Use --allow-system-changes toenable this collection.�flint --versionr r z mst startz mst cable addz mst status -v� ��timeout� mlxcablesz/dev/mst�cablez mlxcables -d z --DDMz --dumpzmst stopT)�changes)� get_option� _log_infor �collect_cmd_output�os�listdir�append)r �coutr �device�mlxcabler r r �collect# s4 ���zMellanoxFirmware.collectc C s g }| � d�}|d dkrd S |d �� D ] }|�|dd� d � qt|�}g }| �d�}|d dkrFdd gd dgd dgd dgddgg}nddgdd gddgddgddgddgddgg}|D ].}|D ]}| j|d � d|� d|d � �dd� qctd�D ]}| �d|� �� t�d� q}q_d S )Nr r r r � z00.0r z mstconfig -d z -e qzmstflint -d z dcz qz mstreg -d z --reg_name ROCE_ACCL --getzmstlink -d � zmlxdump -d z pcie_uc --allz flint -d z mlxreg -d zmlxlink -d zfwtrace -d z -i all --tracer_mode FIFO� � � r � zmstdump ) r � splitlinesr! �setr �add_cmd_output�range�time�sleep) r �devices�device_list�line�commandsr"