Sindbad~EG File Manager

Current Path : /lib/python3.6/site-packages/sos/report/plugins/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/sos/report/plugins/__pycache__/filesys.cpython-36.opt-1.pyc

3

�fG�@sLddlmZmZmZmZmZmZGdd�deeee�ZGdd�dee�ZdS)�)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugin�	CosPlugin�	PluginOptc@sTeZdZdZdZdZdZedddd�ed	dd
d�edddd�gZd
d�Z	dd�Z
dS)�Filesysa�Collects general information about the local filesystem(s) and mount
    points as well as optional information about EXT filesystems. Note that
    information specific filesystems such as XFS or ZFS is not collected by
    this plugin, as there are specific plugins for those filesystem types.

    This plugin will collect /etc/fstab as well as mount information within
    /proc/, and is responsible for the 'mount' and 'df' symlinks that appear
    in an sos archive's root.
    zLocal file systemsZfilesys�storage�lsofFz%collect information on all open files)�defaultZdesc�dumpe2fszdump filesystem info�fragz'collect filesystem fragmentation statuscCs�|jddddddddd	d
g
�|jdddd
�|jdddd
�|jdddg�|jdddddddg�|jd�r�|jdddd�d}|jd �r�d!}d}d"}xF|j||�D]6}|jd#||fd$d%�|jd&�r�|jd'|d(d)�q�WdS)*Nz	/proc/fs/z/proc/mountsz/proc/filesystemsz/proc/self/mountsz/proc/self/mountinfoz/proc/self/mountstatsz/proc/[0-9]*/mountinfoz	/etc/mtabz
/etc/fstabz/run/mount/utabzmount -lZmount)�root_symlink�tagszdf -al -x autofsZdfZdf__alzdf -ali -x autofsZfindmntZlslocksz
/proc/fs/cifsz/proc/fs/ldiskfsz/proc/fs/lustrez
/proc/fs/nfsdz/proc/fs/nfsfsz/proc/fs/panfsz/proc/fs/xfsr
zlsof -b +M -n -l -P�2)r�priorityz-hr�z^(/dev/\S+).+ext[234]\s+zdumpe2fs %s %sZ
dumpe2fs_h)rr
z
e2freefrag %s�d)r)Z
add_copy_spec�add_cmd_outputZadd_forbidden_pathZ
get_optionZdo_regex_find_all)�selfZ
dumpe2fs_optsZmountsZext_fs_regexZdev�r�/usr/lib/python3.6/filesys.py�setup%sP


z
Filesys.setupcCs$|jddd�d}|jd|d�dS)Nz
/etc/fstabz(password=)[^,\s]*z
\1********z](lsof: (avoiding (.*?)|WARNING: can't stat\(\) (.*?))|Output information may be incomplete.)
r
r)Zdo_file_subZdo_cmd_output_sub)rZregexrrr�postproc\szFilesys.postprocN)r	)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesrZoption_listrrrrrrr
s	
7rcseZdZ�fdd�Z�ZS)�
RedHatFilesyscst�j�|jd�dS)Nzls -ltradZ /tmp)�superrr)r)�	__class__rrrms
zRedHatFilesys.setup)rrrr�
__classcell__rr)r rrksrN)	Zsos.report.pluginsrrrrrrrrrrrr�<module>	s ^

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists