o
    O6ufÛ  ã                   @   s&   d dl mZmZ G dd„ deeƒZdS )é    )ÚPluginÚIndependentPluginc                   @   s,   e Zd ZdZdZdZdZdZdZdd„ Z	d	S )
ÚNvmea  Collects nvme device configuration information for each nvme device that
    is installed on the system.

    Basic information is collected via the `smartctl` utility, however detailed
    information will be collected via the `nvme` CLI if the `nvme-cli` package
    is installed.
    zNVMe device informationÚnvme)Ústorage)znvme-cli)r   Ú	nvme_corec                 C   s8   |   g d¢¡ |  ddg¡ g d¢}| j|ddd� d S )N)z/etc/nvme/*z!/sys/class/nvme-fabrics/ctl/nvme*z(/sys/class/nvme-subsystem/nvme-subsys*/*z"/sys/module/nvme_core/parameters/*z	nvme listznvme list-subsys)
zsmartctl --all %(dev)szsmartctl --all %(dev)s -jznvme list-ns %(dev)sznvme fw-log %(dev)sznvme list-ctrl %(dev)sznvme id-ctrl -H %(dev)sznvme id-ns -H %(dev)sznvme smart-log %(dev)sznvme error-log %(dev)sznvme show-regs %(dev)sÚblockznvme.*)ÚdevicesÚ	whitelist)Úadd_copy_specÚadd_cmd_outputÚadd_device_cmd)ÚselfÚcmds© r   ú9/usr/lib/python3/dist-packages/sos/report/plugins/nvme.pyÚsetup   s   þz
Nvme.setupN)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
short_descÚplugin_nameÚprofilesÚpackagesÚkernel_modsr   r   r   r   r   r      s    r   N)Úsos.report.pluginsr   r   r   r   r   r   r   Ú<module>   s   