a >h;@sLddlmZmZmZmZmZmZGdddeeeeZGdddeeZdS))Plugin RedHatPlugin DebianPlugin UbuntuPlugin CosPlugin PluginOptc@sTeZdZdZdZdZdZedddded dd ded dd dgZd dZ ddZ dS)FilesysaCollects 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)ZstoragelsofFz%collect information on all open files)defaultZdescdumpe2fszdump filesystem infofragz'collect filesystem fragmentation statuscCs|gd|jdddd|jdddd|gd|gd |d rd|jd d d d d}|drvd}d}d}|||D]<}|jd|d|dd|dr|jd|ddqdS)N) z /proc/fs/ /proc/mountsz/proc/filesystemsz/proc/self/mountsz/proc/self/mountinfoz/proc/self/mountstatsz/proc/[0-9]*/mountinfoz /etc/mtab /etc/fstabz/run/mount/utabzmount -lZmount) root_symlinktagszdf -al -x autofsZdfZdf__al)zdf -aliT -x autofsZfindmntZlslocks)z /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)rpriorityz-hr r z^(/dev/\S+).+ext[234]\s+z dumpe2fs  Z dumpe2fs_h)rr z e2freefrag d)r)Z add_copy_specadd_cmd_outputZadd_forbidden_pathZ get_optionZdo_regex_find_all)selfZ dumpe2fs_optsZmountsZ ext_fs_regexdevr>/usr/lib/python3.9/site-packages/sos/report/plugins/filesys.pysetup%s0    z Filesys.setupcCs$|dddd}|d|ddS)Nrz(password=)[^,\s]*z \1********z](lsof: (avoiding (.*?)|WARNING: can't stat\(\) (.*?))|Output information may be incomplete.) r r)Z do_file_subZdo_cmd_output_sub)rZregexrrrpostproc\szFilesys.postprocN) __name__ __module__ __qualname____doc__Z short_descZ plugin_nameZprofilesrZ option_listrrrrrrr s  7rcseZdZfddZZS) RedHatFilesyscst|ddS)Nz ls -ldZ /tmp)superrr)r __class__rrrms zRedHatFilesys.setup)rrrr __classcell__rrr#rr!ksr!N) Zsos.report.pluginsrrrrrrrr!rrrr s ^