uec@sOddlmZmZddlmZddlZdeefdYZdS(i(tPlugint RedHatPlugin(tglobNtWatchdogcBs;eZdZdZd Zd Zd gZdZdZRS( sWatchdog information.twatchdogtsystemt conf_fileswatchdog config filetfasts/etc/watchdog.confc Csd}t|d}xx|D]p}|jddj}y=|jdd\}}|jdkrz|j}nWqtk rqXqWWdQX|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.pyt get_log_dirs   cCs$|jd}d}|j|dg|jddgy"|j|}|r\|}nWn*tk r}|jd||fnX|jdrttjj|d}n4ttjj|d ttjj|d }|j|x%td D]}|j d |qWd S(sCollect 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__t plugin_nametprofilestpackagest option_listRR%(((s8/usr/lib/python2.7/site-packages/sos/plugins/watchdog.pyRs  (t sos.pluginsRRRRR(((s8/usr/lib/python2.7/site-packages/sos/plugins/watchdog.pyt s