403Webshell
Server IP : 138.197.107.151  /  Your IP : 216.73.217.120
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux BloxBy-Builder 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User : wpbetasites_mrakzqskir ( 1022)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/spyre.cpython-312.pyc
�

G%@i���,�ddlmZmZGd�dee�Zy)�)�Plugin�IndependentPluginc�2�eZdZdZdZdZdZed��Zd�Z	y)�Spyreu�Spyre chip is IBM’s AI accelerator, designed to handle AI inferencing
    and workloads.

    The Spyre plugin collects data about the Spyre card’s VFIO device node
    tree, configuration files, and more.
    z!IBM Spyre Accelerator Information�spyre)zppc.*c���g}|sy|j�D]�}|j�s�	|jd��\}}}}|j�jd�\}}|dk(s�T|dvs�Y|jd�dk(rd|z}	|jd�\}	}
}|jd	�\}}
|j
|	|
||
f���|S#t$rY��wxYw#t$rY��wxYw)
a�Extract PCI domain, bus, device, function for devices that match:
        - Vendor ID = 0x1014 (IBM)
        - Device ID = 0x06a7 or 0x06a8

        Parameters
        ----------
        lspci_out : str
        The output string from `lspci -n`.

        Returns
        -------
        list of tuples
        A list of (domain, bus, device, function) tuples for each matching
        card.
        N�)�maxsplit�:�1014)�06a7�06a8�z0000:�.)�
splitlines�strip�split�lower�
ValueError�count�append)�lspci_output�spyre_cards�line�pci_addr�_class�ids�_rest�vendor�device�domain�bus�dev_func�
pci_device�functions              �:/usr/lib/python3/dist-packages/sos/report/plugins/spyre.py�get_ibm_spyre_deviceszSpyre.get_ibm_spyre_devicess��$���� �+�+�-�	H�D��:�:�<��
�/3�z�z�1�z�/E�,��&�#�u�!$����!2�!2�3�!7�������F�.>�$>��>�>�#�&�!�+�&��1�H��,4�N�N�3�,?�)�F�C��+3�>�>�#�+>�(�J���"�"�F�C��X�#F�G�'	H�*����
��
��"����s#�9C�	)C�	C�C�	C&�%C&c��|jd�}|ddk7ry|j|d�}|sy|D]3\}}}}|�d|�d|�d|��}d|�d|�d|�d	�}|j|d
���5|jgd��y)
Nzlspci -n�statusr�outputrrz/sys/devices/pci�/z	/vfio-devT)�tree)z/etc/modprobe.d/vfio-pci.confz!/etc/udev/rules.d/95-vfio-3.rulesz#/etc/security/limits.d/memlock.conf)�exec_cmdr'�add_dir_listing�
add_copy_spec)	�self�lspcirr!r"r r%r�pci_vfios	         r&�setupzSpyre.setupHs����
�
�j�)����?�a����0�0��x��A����.9�	6�)�F�C��� ���3�%�q����(��<�H�)�&���3�%�q��
�)�L�H�� � ��� �5�	6�	
���
�	�N)
�__name__�
__module__�__qualname__�__doc__�
short_desc�plugin_name�
architectures�staticmethodr'r3�r4r&rrs0���5�J��K��M��+��+�Zr4rN)�sos.report.pluginsrrrr=r4r&�<module>r?s��9�Q�F�%�Qr4

Youez - 2016 - github.com/yon3zu
LinuXploit