
    -_g
                     4    d dl Z d dlmZmZ  G d dee      Zy)    N)PluginRedHatPluginc                   (    e Zd ZdZdZdZdZd Zd Zy)LustrezLustre filesystemlustre)storagenetworkcluster)r   zlustre-clientc                 V    | j                  ddj                  |       d| d       y)zZUse lctl get_param to collect a selection of parameters into a
            file.

        zlctl get_param  zparams-F)suggest_filenamestderrN)add_cmd_outputjoin)selfname
param_lists      ;/usr/lib/python3/dist-packages/sos/report/plugins/lustre.py
get_paramszLustre.get_params   s7    
 	ochhz.B-CD/6tf-=#( 	 	*    c                    | j                  g d       | j                  d      d   }d}|j                         D cg c]  }t        j                  ||      s| }}| j                  d|       | j                  dg d       | j                  dd	g       | j                  d
g d       | j                  ddg       | j                  ddg       | j                  dddg       | j                  d       | j                  ddg       | j                  d      r8| j                  d       | j                  ddg       | j                  ddg       y y c c}w )N)zlctl debug_kernelzlctl device_listzlctl list_nidszlctl route_listzlnetctl net show -v 4zlctl list_param -R *outputzn.*@.*|.*dump_page_cache|peers|.*quota.*|osd-.*|.*osc.*|mgs.*|.*mgc_irstate|ldlm.*state|.*job_stats|.*exports.*allbasic)versionhealth_checkdebugzlfs dfz	lfs df -i
osc_client)zosc.*.max_dirty_mbzosc.*.max_pages_per_rpczosc.*.checksumszosc.*.max_rpcs_in_flightosdz3osd-*.*.{mntdev,files*,kbytes*,blocksize,brw_stats}quotaz)osd-*.*.quota_slave.{info,limit_*,acct_*}mgszmgs.MGS.ir_timeoutzmgs.MGS.live.*z*/mb_groupsz/sys/fs/ldiskfsz/proc/fs/ldiskfsall_logsz/tmp/lustre-log.*z	job-statsz*.*.job_statspeers)	r   exec_cmd
splitlinesrematchr   add_forbidden_pathadd_copy_spec
get_option)r   r   excludeitemparamss        r   setupzLustre.setup   sh    
 	 56x@M#)#4#4#6 24'40  2 2v&0	
 	
 	 	 '
 	 	BC	
 	"M!NO 46FGH 	.
 	 ??:&23OOK/):;OOGgY/ 'K2s   EN)	__name__
__module____qualname__
short_descplugin_nameprofilespackagesr   r.    r   r   r   r      s     $JK2H,H*50r   r   )r&   sos.report.pluginsr   r   r   r6   r   r   <module>r8      s    
 3F0V\ F0r   