NineSec Team Shell
Server IP : 184.107.3.203  /  Your IP : 216.73.216.51
Web Server : Apache
System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64
User : adminteladeoro ( 1015)
PHP Version : 8.2.28
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/watchdog.cpython-36.opt-1.pyc
3

~�g��@s6ddlmZddlmZmZmZGdd�dee�ZdS)�)�glob)�Plugin�RedHatPlugin�	PluginOptc@s<eZdZdZdZd
ZdZedddd�gZdd	�Z	d
d�Z
dS)�WatchdogzWatchdog information.�watchdog�systemz	conf-filez/etc/watchdog.confzwatchdog config file)�defaultZdesccCs�d}t|ddd��d}x\|D]T}|jd�dj�}y(|jdd�\}}|j�d	krV|j�}Wqtk
rlYqXqWWdQRX|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.6/watchdog.py�get_log_dirs	
zWatchdog.get_log_dircCs�|j|jd��}|jd�}|j|dg�|jddg�y|j|�}|rJ|}Wn8tk
r�}z|jd|�d|���WYdd}~XnX|jd	�r�t|j|d
��}n t|j|d��t|j|d��}|j|�x&t|jd
��D]}|jd|���q�WdS)z�Collect watchdog information.

            Collect configuration files, custom executables for test-binary
            and repair-binary, and stdout/stderr logs.
        z	conf-filez/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�resZexZ	log_filesZdevrrr�setup4s*

(

zWatchdog.setupN)r)r)�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackagesrZoption_listrrrrrrrs
rN)rZsos.report.pluginsrrrrrrrr�<module>s

NineSec Team - 2022