3
ܓi; @ sL d dl mZmZmZmZmZmZ G dd deeeeZG dd deeZdS ) )PluginRedHatPluginDebianPluginUbuntuPlugin CosPlugin PluginOptc @ sT e Zd ZdZdZdZdZedddded dd
deddddgZd
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 systemsZfilesysstoragelsofFz%collect information on all open files)defaultZdescdumpe2fszdump filesystem infofragz'collect filesystem fragmentation statusc C s | j ddddddddd d
g
| jdddd
| jdddd
| jdddg | jdddddddg | jdr| jdddd d}| jd rd!}d}d"}xL| j||D ]<}| jd#| d$| d%d& | jd'r| jd(| d)d* qW d S )+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_symlinktagszdf -al -x autofsZdfZdf__alzdf -aliT -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 -P2 )r priorityz-hr z^(/dev/\S+).+ext[234]\s+z dumpe2fs Z
dumpe2fs_h)r r
ze2freefrag d )r )Z
add_copy_specadd_cmd_outputZadd_forbidden_pathZ
get_optionZdo_regex_find_all)selfZ
dumpe2fs_optsZmountsZext_fs_regexZdev r /usr/lib/python3.6/filesys.pysetup% sP
z
Filesys.setupc C s$ | j ddd d}| jd|d d S )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)r Zregexr r r postproc\ s zFilesys.postprocN)r )__name__
__module____qualname____doc__Z
short_descZplugin_nameZprofilesr Zoption_listr r r r r r r
s
7r c s e Zd Z fddZ ZS )
RedHatFilesysc s t j | jd d S )Nzls -ldZ /tmp)superr r )r ) __class__r r r m s
zRedHatFilesys.setup)r r r r
__classcell__r r )r! r r k s r N) Zsos.report.pluginsr r r r r r r r r r r r