Current File : //usr/lib/python2.7/site-packages/sos/plugins/watchdog.pyc
�
u��ec@sOddlmZmZddlmZddlZdeefd��YZdS(i����(tPlugintRedHatPlugin(tglobNtWatchdogcBs;eZdZdZd	Zd
ZdgZd�Zd�ZRS(sWatchdog information.twatchdogtsystemt	conf_fileswatchdog config filetfasts/etc/watchdog.confc
Cs�d}t|d���}xx|D]p}|jd�dj�}y=|jdd�\}}|j�dkrz|j�}nWqtk
r�qXqWWdQX|S(sGet 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.
        trt#it=islog-dirN(tNonetopentsplittstript
ValueError(tselfRtlog_dirtconf_ftlinetkeytvalue((s8/usr/lib/python2.7/site-packages/sos/plugins/watchdog.pytget_log_dirs	

cCs$|jd�}d}|j|dg�|jddg�y"|j|�}|r\|}nWn*tk
r�}|jd||f�nX|jd�r�ttjj|d��}n4ttjj|d	��ttjj|d
��}|j|�x%td�D]}|j	d|�qWd
S(s�Collect watchdog information.

            Collect configuration files, custom executables for test-binary
            and repair-binary, and stdout/stderr logs.
        Rs/var/log/watchdogs/etc/sysconfig/watchdogs/etc/watchdog.ds/usr/libexec/watchdog/scriptssCould not read %s: %stall_logst*s*.stdouts*.stderrs/dev/watchdog*swdctl %sN(
t
get_optiont
add_copy_specRtIOErrort	_log_warnRtostpathtjointadd_cmd_output(RRRtrestext	log_filestdev((s8/usr/lib/python2.7/site-packages/sos/plugins/watchdog.pytsetup3s*



(ssystem(R(s	conf_fileswatchdog config fileRs/etc/watchdog.conf(	t__name__t
__module__t__doc__tplugin_nametprofilestpackagestoption_listRR%(((s8/usr/lib/python2.7/site-packages/sos/plugins/watchdog.pyRs		(tsos.pluginsRRRRR(((s8/usr/lib/python2.7/site-packages/sos/plugins/watchdog.pyt<module>s