Ë
    i©¹d>  ã                   ó<   — d dl mZmZmZ d dlmZ  G d„ dee«      Zy)é    )ÚPluginÚRedHatPluginÚ	PluginOpt)Úglobc                   ó@   — e Zd ZdZdZdZdZ eddd¬«      gZd	„ Z	d
„ Z
y)ÚWatchdogzWatchdog information.Úwatchdog)Úsystem)r	   Ú	conf_filez/etc/watchdog.confzwatchdog config file)ÚdefaultÚdescc                 ó2  — d}t        |d«      5 }|D ]]  }|j                  d«      d   j                  «       }	 |j                  dd«      \  }}|j                  «       dk(  r|j                  «       }Œ_ 	 ddd«       |S # t        $ r Y Œvw xY w# 1 sw Y   |S xY w)a  Get 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Úrú#r   ú=é   zlog-dir)ÚopenÚsplitÚstripÚ
ValueError)Úselfr   Úlog_dirÚconf_fÚlineÚkeyÚvalues          ú=/usr/lib/python3/dist-packages/sos/report/plugins/watchdog.pyÚget_log_dirzWatchdog.get_log_dir   s¤   € ð ˆä�)˜SÓ!ð 		 VØò �Ø—z‘z #“ qÑ)×/Ñ/Ó1�ðØ#'§:¡:¨c°1Ó#5‘L�S˜%Ø—y‘y“{ iÒ/Ø"'§+¡+£-˜øñ÷		ð ˆøô "ò Ùðú÷		ð ˆús.   �(B¸8A=Á0BÁ=	B	ÂBÂB	Â	BÂBc                 óˆ  — | j                  | j                  d«      «      }| j                  d«      }| j                  |dg«       | j                  ddg«       	 | j                  |«      }|r|}| j                  d	«      rt        | j                  |d
«      «      }n7t        | j                  |d«      «      t        | j                  |d«      «      z   }| j                  |«       t        | j                  d«      «      D ]  }| j                  d|z  «       Œ y# t        $ r!}| j                  d|›d|›�«       Y d}~ŒÎd}~ww xY w)zªCollect watchdog information.

            Collect configuration files, custom executables for test-binary
            and repair-binary, and stdout/stderr logs.
        r   z/var/log/watchdogz/etc/sysconfig/watchdogz/etc/watchdog.dz/usr/libexec/watchdog/scriptszCould not read z: NÚall_logsÚ*z*.stdoutz*.stderrz/dev/watchdog*zwdctl %s)Ú	path_joinÚ
get_optionÚadd_copy_specr   ÚIOErrorÚ	_log_warnr   Úadd_cmd_output)r   r   r   ÚresÚexÚ	log_filesÚdevs          r   ÚsetupzWatchdog.setup4   s:  € ð —N‘N 4§?¡?°;Ó#?Ó@ˆ	Ø—.‘.Ð!4Ó5ˆð 	×ÑØØ%ð
ô 	ð 	×ÑØØ+ð
ô 	ð	FØ×"Ñ" 9Ó-ˆCÙØ�ð �?‰?˜:Ô&Ü˜TŸ^™^¨G°SÓ9Ó:‰Iä˜dŸn™n¨W°jÓAÓBÜ˜dŸn™n¨W°jÓAÓBñCˆIð 	×Ñ˜9Ô%ô ˜Ÿ™Ð'7Ó8Ó9ò 	2ˆCØ×Ñ 
¨SÑ 0Õ1ñ	2øô ò 	FØ�NŠN²iÁÐD×EÑEûð	Fús   ÁD Ä	EÄ D<Ä<EN)Ú__name__Ú
__module__Ú__qualname__Ú
short_descÚplugin_nameÚprofilesÚpackagesr   Úoption_listr   r,   © ó    r   r   r      s9   „ à(€JØ€KØ€HØ€Hñ 	�+Ð';Ø-ô	/ð€Kò
ó0'2r6   r   N)Úsos.report.pluginsr   r   r   r   r   r5   r6   r   ú<module>r8      s    ð÷ ?Ñ >å ôK2ˆv�|õ K2r6   