HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python3.9/site-packages/sos/report/plugins/__pycache__/watchdog.cpython-39.opt-1.pyc
a

\��h��@s6ddlmZddlmZmZmZGdd�dee�ZdS)�)�glob)�Plugin�RedHatPlugin�	PluginOptc@s<eZdZdZdZdZdZedddd�gZd	d
�Z	dd�Z
d
S)�WatchdogzWatchdog information.�watchdog)�system)r�	conf-filez/etc/watchdog.confzwatchdog config file)�defaultZdescc
Cs�d}t|ddd��h}|D]R}|�d�d��}z(|�dd�\}}|��d	krT|��}WqtyhYq0qWd�n1s�0Y|S)
aGet 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_dirs	&zWatchdog.get_log_dirc
Cs�|�|�d��}|�d�}|�|dg�|�ddg�z|�|�}|rJ|}Wn:ty�}z"|�d|�d|���WYd}~n
d}~00|�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_warnrZadd_cmd_output)rrr�res�exZ	log_files�devrrr�setup4s0
��
,
�
zWatchdog.setupN)�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackagesrZoption_listrr"rrrrrs��rN)rZsos.report.pluginsrrrrrrrr�<module>s