文件操作 - filesys.cpython-310.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/filesys.cpython-310.pyc
编辑文件内容
o i��d� � @ 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 systems�filesys)�storage�lsofFz%collect information on all open files)�default�desc�dumpe2fszdump filesystem info�fragz'collect filesystem fragmentation statusc C s� | � g d�� | jdddd� | jdddd� | �g d�� | �d � | �d �r0| jdd dd � d}| �d�r9d}d}d}| �||�D ]}| jd||f dd� | �d�r^| jd| dd� qCd 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/fstabzmount -l�mount)�root_symlink�tagszdf -al -x autofs�df�df__al)zdf -ali -x autofs�findmnt�lslocksz/proc/fs/panfsr zlsof -b +M -n -l -P�2 )r �priorityz-hr � r z^(/dev/\S+).+ext[234]\s+zdumpe2fs %s %s� dumpe2fs_h)r r z e2freefrag %s�d )r )� add_copy_spec�add_cmd_output�add_forbidden_path� get_option�do_regex_find_all)�self� dumpe2fs_opts�mounts�ext_fs_regex�dev� r( �</usr/lib/python3/dist-packages/sos/report/plugins/filesys.py�setup% s4 �� � � ��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 )�do_file_sub�do_cmd_output_sub)r# �regexr( r( r) �postprocM s �zFilesys.postprocN)�__name__� __module__�__qualname__�__doc__� short_desc�plugin_name�profilesr �option_listr* r. r( r( r( r) r s ���(r c s e Zd Z� fdd�Z� ZS )� RedHatFilesysc s t t| ��� | �d� d S )Nzls -ltradZ /tmp)�superr7 r* r )r# �� __class__r( r) r* ^ s zRedHatFilesys.setup)r/ r0 r1 r* � __classcell__r( r( r9 r) r7 \ s r7 N) �sos.report.pluginsr r r r r r r r7 r( r( r( r) �<module> s O
修改文件时间
将文件时间修改为当前时间的前一年
删除文件