U
    -_g                     @   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)Zstorage)znvme-cli)r   Z	nvme_corec              
   C   sL   |  ddddg | ddg ddd	d
ddddddg
}| j|ddd d S )Nz/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-subsysz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.*)ZdevicesZ	whitelist)Zadd_copy_specZadd_cmd_outputZadd_device_cmd)selfZcmds r   9/usr/lib/python3/dist-packages/sos/report/plugins/nvme.pysetup   s,    z
Nvme.setupN)
__name__
__module____qualname____doc__Z
short_descZplugin_nameZprofilesZpackagesZkernel_modsr
   r   r   r   r	   r      s   r   N)Zsos.report.pluginsr   r   r   r   r   r   r	   <module>	   s   