관리-도구
편집 파일: filesys.cpython-39.pyc
a -�_g; � @ sL d dl mZmZmZmZmZmZ G dd� deeee�ZG dd� dee�ZdS )� )�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugin� CosPlugin� PluginOptc @ sT e Zd ZdZdZdZdZedddd�ed dd d�edddd�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)Zstorage�lsofFz%collect information on all open files)�defaultZdesc�dumpe2fszdump filesystem info�fragz'collect filesystem fragmentation statusc C s� | � g d�� | jdddd� | jdddd� | �g d�� | �g d �� | �d �rd| jdd dd � d}| �d�rvd}d}d}| �||�D ]<}| jd|� d|� �dd� | �d�r�| jd|� �dd� q�d S )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_symlink�tagszdf -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 -P�2 )r �priorityz-hr � r z^(/dev/\S+).+ext[234]\s+z dumpe2fs � Z dumpe2fs_h)r r ze2freefrag �d )r )Z add_copy_spec�add_cmd_outputZadd_forbidden_pathZ get_optionZdo_regex_find_all)�selfZ dumpe2fs_optsZmountsZext_fs_regex�dev� r �>/usr/lib/python3.9/site-packages/sos/report/plugins/filesys.py�setup% s0 �� � � z Filesys.setupc C s$ | � ddd� d}| �d|d� d S )Nr z(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)�__name__� __module__�__qualname__�__doc__Z short_descZplugin_nameZprofilesr Zoption_listr r r r r r r s ���7r c s e Zd Z� fdd�Z� ZS )� RedHatFilesysc s t � �� | �d� 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 �<module> s ^