+
    i3  c                   sD    ^ RI Ht ^ RIHtHtHtHt  ! R R]]]4      tR# )i    )gethostname)PluginRedHatPluginDebianPlugin	PluginOptc                   s|   a  ] tR t^t o RtRtRtRtRt]	! R^dRR7      ]	! R^RR7      .t
R	tR	tR	tR
tR tR tRtV tR	# )PcpzPerformance Co-Pilot datapcpz/etc/pcp.conf	pmmgrlogszsize limit in MB of pmmgr logs)ZdefaultZdescpmloggerfilesz#number of pmlogger files to collectN c                s    \        V P                  RRR7      ;_uu_ 4       pVP                  4       pRRR4       / pX FB  pTP	                  R4      '       d   K   TP                  4       P                  R4      w  rVYcT&   KD  	   TR,          T n	        TR	,          T n
        TR
,          T n        R#   + '       g   i     L; i  \         d     R# i ; i  \        \        3 d     K  i ; i  \         d     R# i ; i)zParse PCP configuration ZrzUTF-8)ZencodingNFZ#Z=ZPCP_SYSCONF_DIRZPCP_VAR_DIRZPCP_LOG_DIRT)Zopenpcp_conffileZ	readlinesZIOError
startswithZstripsplitZ
ValueErrorZKeyErrorpcp_sysconf_dirpcp_var_dirpcp_log_dirZ	Exception)selfZpcpconfZlinesZenv_varslineZkeyZvalues   &      ;/usr/lib/python3.14/site-packages/sos/report/plugins/pcp.pypcp_parse_conffileZPcp.pcp_parse_conffile'   s    	d''w??7))+ @ Ds###zz|11#6 % 	#+,=#>D '6D'6D
 / @? 		 )   		sQ    C B2C %C*C/ 2C	=C C CCC,+C,/C>=C>c                s   V P                  R 4      '       d   RMV P                  R4      pV P                  R 4      '       d   RMV P                  R4      pV P                  4       '       g!   V P                  RV P                   24       R# V P	                  V P
                  R4      pV P                  V P                  V P                  V.4       V P                  V P	                  VR4      V P	                  VR4      V P	                  VR4      V P	                  VR	4      .4       \        4       V n
        V P                  R
8w  d   V P	                  V P                  RV P                  R4      pV P                  WARR7       ^ pV P	                  V P                  RV P                  R4      pV P                  RV 24      pVR,          ^ 8X  dM   VR,          P                  4        F1  pV P                  V^ R7       V^,           pV'       g   K)  WR8X  g   K1   M	  V P                  V P	                  V P                  R4      V P	                  V P                  R4      V P	                  V P
                  R4      V P	                  V P                  R4      V P	                  V P                  R4      V P	                  V P                  R4      .4       V P                  R4      pVR,          ^ 8X  dh   VR,          P                  4        FJ  pVP                  R4      '       g   K  VP!                  4       R,          p	V P#                  RV	 2RR7        R# 	  R# R# ) Zall_logsNr   r   zcould not parse ZconfigZpmchartZ	pmlogconfZpmieconfZpmlogrewriter	   ZpmmgrZ*F)	sizelimitZtailitZpmloggerzls -t1 ZstatusZoutput)r   ZpmcdzNOTICES*Zpmnsz*/*.log*z
*/*/*.log*z*/*/config*r   z
 pmlogger:z%pmstat -S 00:00 -T 23:59 -t 5m -x -a Zpmstat)Zroot_symlinki)Z
get_optionr   Z	_log_warnr
   Z	path_joinr   Zadd_copy_specr   Zadd_forbidden_pathr    pcp_hostnamer   Zexec_cmdZ
splitlinesZcollect_cmd_outputr   r   Zadd_cmd_output)
r   r   Z
countlimitZvar_conf_dirZpathZfiles_collectedZpmlogger_lsr   ZresZarcs
   &         r   setupZ	Pcp.setupC   s   !__Z88T//+6 	"ooj99d???; 	 &&((NN-d.?.?-@AB ~~d&6&6A  
 	 	NN<3NN<5NN<4NN<8	!
 	$ (M ">>$"2"2G"&"3"3S:DtGO>>$"2"2J"&"3"3S:D--'$(89K8$)'1<<>D&&tq&9&5&9O!zo&C	 ? 	NN4++V4NN4++Z8NN4++V4 NN4++Z8NN4++\:NN4++];
 	 %%e,x=AH002??<00**,r*C''?uE%- (   3     )r   r   r   r   )ZsystemZperformance)r   )Z__name__Z
__module__Z__qualname__Z__firstlineno__Z
short_descZplugin_nameZprofilesZpackagesr
   r   Zoption_listr   r   r   r   r   r   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      sl     ,JK(HH"L 	+s7	9/2<	>K OKKL8W Wr   r   N)Zsocketr    Zsos.report.pluginsr   r   r   r   r   ) r   r   <module>r      s"     L LK&, Kr   