????

Your IP : 216.73.216.152


Current Path : /proc/self/root/proc/self/root/lib/python2.7/site-packages/sos/plugins/
Upload File :
Current File : //proc/self/root/proc/self/root/lib/python2.7/site-packages/sos/plugins/logs.pyo

�
Dr^c@s�ddlZddlZddlmZmZmZmZdefd��YZdeefd��YZdeeefd��YZ	dS(	i����N(tPlugintRedHatPlugintDebianPlugintUbuntuPlugintLogscBs,eZdZdZdZd�Zd�ZRS(sSystem logstlogstsystemthardwaretstoragec	Cs�|jdddg�|jd�|jd�|jdddt�|jdd	dt�|jd
�ddg}g}tjjd�r�tdd��M}xC|j�D]5}|j	d�r�|t
j
|j�d
�7}q�q�WWdQXnxK|D]C}tjj|�sq�n|j|�}||j
d|�7}q�WxL|D]D}|j	d�re|d
}ntjj|�rC|j|�qCqCW|jd�r�|jdddtdd�|jdd	dtdd�ndS(Ns/etc/syslog.confs/etc/rsyslog.confs/etc/rsyslog.ds/var/log/boot.logs/var/log/cloud-init*tboottthistcatalogtlastsjournalctl --disk-usagetrs$IncludeConfigis^\S+\s+(-?\/.*$)\s+t-tall_logst	allfieldstoutputtverbose(t
add_copy_spectadd_journaltTruetadd_cmd_outputtostpathtexiststopent	readlinest
startswithtglobtsplittjoin_sysroottdo_regex_find_alltisfilet
get_option(tselftconfsRtconftlinetconfigti((s4/usr/lib/python2.7/site-packages/sos/plugins/logs.pytsetups:



-


cCs*|jddd�|jddd�dS(Ns
/etc/rsyslog*sActionLibdbiPassword (.*)sActionLibdbiPassword [********]spwd=.*spwd=[******](tdo_path_regex_sub(R#((s4/usr/lib/python2.7/site-packages/sos/plugins/logs.pytpostproc:s(ssystemRR(t__name__t
__module__t__doc__tplugin_nametprofilesR)R+(((s4/usr/lib/python2.7/site-packages/sos/plugins/logs.pyRs
	&t
RedHatLogscBseZdgZd�ZRS(tlog_dayss"the number of days logs to collectticCs�tt|�j�d}d}tjj|�}|j|d�|j|d�|r�|jd�r�yt|j	d��}Wnt
k
r�d}nX|j	d�r�d}n
d	|}|jd
|�ndS(Ns/var/log/messagess/var/log/securet*tsystemdR2iRR3s-%ddaystsince(tsuperR1R)RRRRtis_installedtintR"t
ValueErrorR(R#tmessagestsecuret
have_messagestdaysR6((s4/usr/lib/python2.7/site-packages/sos/plugins/logs.pyR)Ms

	
(slog_dayss"the number of days logs to collectR3i(R,R-toption_listR)(((s4/usr/lib/python2.7/site-packages/sos/plugins/logs.pyR1Gs	t
DebianLogscBseZdgZd�ZRS(R2s"the number of days logs to collectR3icCs�tt|�j�t|jd��}tjjd�}|jddddg�|j	d�|r�|j
d�r�|jd	�r�d
}n
d|}|jd|�nG|jd	�s�|jd
dddddg�n|jdddg�dS(NR2s/var/log/journal/s
/var/log/udevs/var/log/dist-upgrades/var/log/installers/var/log/unattended-upgradessls -alRh /var/log/R5RR3s-%ddaysR6s/var/log/syslogs/var/log/syslog.1s/var/log/kern.logs/var/log/kern.log.1s/var/log/auth.logs/var/log/auth.log.1s/var/log/syslog*s/var/log/kern.log*s/var/log/auth.log*(R7R@R)R9R"RRRRRR8R(R#R>tjournalR6((s4/usr/lib/python2.7/site-packages/sos/plugins/logs.pyR)os4

	

(slog_dayss"the number of days logs to collectR3i(R,R-R?R)(((s4/usr/lib/python2.7/site-packages/sos/plugins/logs.pyR@is	(
RRtsos.pluginsRRRRRR1R@(((s4/usr/lib/python2.7/site-packages/sos/plugins/logs.pyt<module>	s
"9"