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 )
XfszThis plugin collects information on mounted XFS filessystems on the
    local system.

    Users should expect `xfs_info` and `xfs_admin` collections by this plugin
    for each XFS filesystem that is locally mounted.
    zXFS filesystemxfs)Zstorage)/sys/fs/xfs/proc/fs/xfs)r   c                 C   sp   d}d}t | ||D ]D}|D ]:}|d}| jd|d  dd | d|d	   q q| d
dg d S )Nz/proc/mountsz^(/dev/.+).+xfs\s+ z	xfs_info    Zxfs_info)Ztagszxfs_admin -l -u r   r   r   )zipZdo_regex_find_allsplitZadd_cmd_outputZadd_copy_spec)selfZmountsZext_fs_regexZdevZextparts r   8/usr/lib/python3/dist-packages/sos/report/plugins/xfs.pysetup   s    
z	Xfs.setupN)
__name__
__module____qualname____doc__Z
short_descZplugin_nameZprofilesfilesZkernel_modsr   r   r   r   r   r      s   r   N)Zsos.report.pluginsr   r   r   r   r   r   r   <module>	   s   