HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/watchdog.cpython-36.pyc
3

3��d>�@s6ddlmZmZmZddlmZGdd�dee�ZdS)�)�Plugin�RedHatPlugin�	PluginOpt)�globc@s<eZdZdZdZd
ZdZedddd�gZdd	�Z	d
d�Z
dS)�WatchdogzWatchdog information.�watchdog�system�	conf_filez/etc/watchdog.confzwatchdog config file)�defaultZdesccCs|d}t|d��d}x\|D]T}|jd�dj�}y(|jdd�\}}|j�dkrR|j�}Wqtk
rhYqXqWWdQRX|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_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|}Wn4tk
r�}z|jd||f�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.
        r	z/var/log/watchdogz/etc/sysconfig/watchdogz/etc/watchdog.dz/usr/libexec/watchdog/scriptszCould not read %s: %sNZall_logs�*z*.stdoutz*.stderrz/dev/watchdog*zwdctl %s)Z	path_joinZ
get_optionZ
add_copy_specr�IOErrorZ	_log_warnrZadd_cmd_output)rr	r�resZexZ	log_filesZdevrrr�setup4s*

$

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