관리-도구
편집 파일: watchdog.cpython-39.pyc
a ����-�_g�����������������������@���s6���d�dl�m�Z��d�dlmZmZmZ�G�dd��dee�ZdS�)�����)�glob)�Plugin�RedHatPlugin� PluginOptc�������������������@���s<���e�Zd�ZdZdZdZdZedddd�gZd d ��Z dd��Z d S�)�WatchdogzWatchdog information.�watchdog)�system)r���� conf-filez/etc/watchdog.confzwatchdog config file)�defaultZdescc�������������� ���C���s����d}t�|ddd��h}|D�]R}|�d�d����}z(|�dd�\}}|���d krT|���}W�q�tyh���Y�q0�qW�d����n1�s�0����Y��|S�) a��Get watchdog log directory. Get watchdog log directory path configured in ``conf_file``. :returns: The watchdog log directory path. :returntype: str. :raises: IOError if ``conf_file`` is not readable. N�rzUTF-8)�encoding�#r����=����zlog-dir)�open�split�strip� ValueError)�self� conf_file�log_dirZconf_f�line�key�value��r����?/usr/lib/python3.9/site-packages/sos/report/plugins/watchdog.py�get_log_dir���s���� &zWatchdog.get_log_dirc�������������� ���C���s����|���|��d��}|���d�}|��|dg��|��ddg��z|��|�}|rJ|}W�n:�ty��}�z"|��d|��d|�����W�Y�d}~n d}~0�0�|��d �r�t|���|d ��}n t|���|d��t|���|d���}|��|��t|���d ��D�]}|��d|�����q�dS�)z�Collect watchdog information. Collect configuration files, custom executables for test-binary and repair-binary, and stdout/stderr logs. r ���z/var/log/watchdogz/etc/sysconfig/watchdogz/etc/watchdog.dz/usr/libexec/watchdog/scriptszCould not read z: NZall_logs�*z*.stdoutz*.stderrz/dev/watchdog*zwdctl )Z path_joinZ get_optionZ add_copy_specr����IOErrorZ _log_warnr���Zadd_cmd_output)r���r���r����res�exZ log_files�devr���r���r����setup4���s0���� �� , � zWatchdog.setupN)�__name__� __module__�__qualname__Z short_descZplugin_nameZprofilesZpackagesr���Zoption_listr���r"���r���r���r���r���r������s�����r���N)r���Zsos.report.pluginsr���r���r���r���r���r���r���r����<module>���s���