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 ] |
---|
3 ~ �g� � @ sX d dl Z d dlmZmZmZmZ G dd� de�ZG dd� dee�ZG dd� dee�ZdS ) � N)�Plugin� PluginOpt�IndependentPlugin� CosPluginc @ s( e Zd ZdZdZdZdd� Zdd � Zd S )�LogsBasezSystem logs�logs�system�hardware�storagec s� d}d|g}g }� j |�rlt� j|�ddd��8}x0|j� D ]$}|jd�r:|tj|j� d �7 }q:W W d Q R X x8|D ]0}� j � j|��s�qr� j|�}|� jd|�7 }qrW x6|D ].}|jd �r�|dd � }� j|�r�� j |� q�W � j d ddd ddddddddg� � j d� � jddd� t� fdd�d*D ��}|�r�� j d��r�� jddgd d!� � jd"d#d$� � jd%d&d$� � jd'��r�� j d(d)g� d S )+Nzetc/rsyslog.confz/etc/syslog.conf�rzUTF-8)�encodingz$IncludeConfig� z^\S+\s+(-?\/.*$)\s+�-z/var/log/auth.log*z/var/log/boot.logz/var/log/dist-upgradez/var/log/installerz/var/log/kern.log*z/var/log/messages*z/var/log/secure*z/var/log/syslog*z /var/log/udevz/etc/rsyslog.confz/etc/rsyslog.dzjournalctl --disk-usagez/var/logT)� recursivec 3 s | ]}� j � j|d ��V qdS )zlog/journal/N)�path_exists� path_join)�.0�p)�self� �/usr/lib/python3.6/logs.py� <genexpr>A s z!LogsBase.setup.<locals>.<genexpr>�/var�/runzsystemd-journaldZjournal_fullZjournal_all�d )�tagsZpriority�thisZjournal_since_boot)Zbootr ZlastZjournal_last_boot�all_logsz/var/log/journal/*z/run/log/journal/*)r r )r �openr � readlines� startswith�glob�splitZdo_regex_find_allZpath_isfileZ add_copy_spec�add_cmd_outputZadd_dir_listing�anyZ is_service�add_journal� get_option) r ZrsyslogZconfsr Zconf�line�config�iZjournalr )r r �setup sX $ zLogsBase.setupc C s | j ddd� d S )Nz /etc/rsyslog*z (ActionLibdbiPassword |pwd=)(.*)z\1[********])Zdo_path_regex_sub)r r r r �postprocN s zLogsBase.postprocN)r r r )�__name__� __module__�__qualname__Z short_desc�plugin_name�profilesr* r+ r r r r r s :r c @ s e Zd ZdZdZdZdS )�IndependentLogsa� This plugin will collect logs traditionally considered to be "system" logs, meaning those such as /var/log/messages, rsyslog, and journals that are not limited to unit-specific entries. Note that the --since option will apply to journal collections by this plugin as well as the typical application to log files. Most users can expect typical journal collections to include the "full" journal, as well as journals limited to this boot and the previous boot. r r r r N)r r r )r, r- r. �__doc__r/ r0 r r r r r1 V s r1 c s, e Zd Zedddd�gZ� fdd�Z� ZS )�CosLogszlog-days� z"the number of days logs to collect)�name�defaultZdescc sD t � j� | jd�r | jd� n | jdd�}| jd|� d�d� d S )Nr zjournalctl -o exportzlog-daysr4 r �days)Zsince)�superr* r&