Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/watchdog.cpython-310.pyc
o

i��d>�@s6ddlmZmZmZddlmZGdd�dee�ZdS)�)�Plugin�RedHatPlugin�	PluginOpt)�globc@s<eZdZdZdZdZdZedddd�gZd	d
�Z	dd�Z
d
S)�WatchdogzWatchdog information.�watchdog)�system)r�	conf_filez/etc/watchdog.confzwatchdog config file)�default�descc
Cs�d}t|d��4}|D](}|�d�d��}z|�dd�\}}|��dkr(|��}Wq
ty2Yq
wWd�|S1s>wY|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�r�#r�=�zlog-dir)�open�split�strip�
ValueError)�selfr	�log_dir�conf_f�line�key�value�r�=/usr/lib/python3/dist-packages/sos/report/plugins/watchdog.py�get_log_dirs"	���
��zWatchdog.get_log_dirc
Cs�|�|�d��}|�d�}|�|dg�|�ddg�z|�|�}|r%|}WntyA}z|�d||f�WYd}~nd}~ww|�d�rPt|�|d	��}nt|�|d
��t|�|d��}|�|�t|�d��D]	}|�d
|�qldS)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 %s: %sN�all_logs�*z*.stdoutz*.stderrz/dev/watchdog*zwdctl %s)�	path_join�
get_option�
add_copy_specr�IOError�	_log_warnr�add_cmd_output)rr	r�res�ex�	log_files�devrrr�setup4s8
��
���
�
�zWatchdog.setupN)�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�packagesr�option_listrr)rrrrrs��rN)�sos.report.pluginsrrrrrrrrr�<module>s


Spamworldpro Mini