U
    i©¹de  ã                   @   s&   d dl mZmZ G dd„ deeƒZdS )é    )ÚPluginÚRedHatPluginc                   @   s,   e Zd ZdZdZdZdZdd„ Zdd„ Zd	S )
ÚLustrezLustre filesystemÚlustre)ZstorageZnetworkZcluster)r   zlustre-clientc                 C   s"   | j dd |¡ d| dd dS )zZUse lctl get_param to collect a selection of parameters into a
            file.

        zlctl get_param %sú z	params-%sF)Zsuggest_filenameÚstderrN)Úadd_cmd_outputÚjoin)ÚselfÚnameZ
param_list© r   ú;/usr/lib/python3/dist-packages/sos/report/plugins/lustre.pyÚ
get_params   s    þzLustre.get_paramsc                 C   s0  |   dddddg¡ |  dddd	d
g¡ |  dddddg¡ |  dddg¡ |  ddg¡ |  dddg¡ |  ddg¡ |  ddg¡ |  ddg¡ |   ddg¡ |  d d!d"d#d$g¡ |  d%d&g¡ |  d'd(g¡ |  d)d*d+g¡ |  d,d-g¡ |  d.d/g¡ |  d0¡ |  d1d2g¡ |  d3¡r,|  d4¡ d S )5Nzlctl debug_kernelzlctl device_listzlctl list_nidszlctl route_listzlnetctl net show -vZbasicÚversionZhealth_checkÚdebugZtimeoutZlnetZpeersZroutesZroutersZniszldlm-lruzldlm.namespaces.*.lru_max_agezldlm.namespaces.*.lru_sizezldlm-statesz	*.*.stateZjobidZ
jobid_nameZ	jobid_varz	job-statsz*.*.job_statsZserver_uuidsz*.*.*server_uuidZmgc_irstatezmgc.*.ir_statezlfs dfz	lfs df -iZ
osc_clientzosc.*.max_dirty_mbzosc.*.max_pages_per_rpczosc.*.checksumszosc.*.max_rpcs_in_flightZosdz3osd-*.*.{mntdev,files*,kbytes*,blocksize,brw_stats}Zquotaz)osd-*.*.quota_slave.{info,limit_*,acct_*}Zmgszmgs.MGS.ir_timeoutzmgs.MGS.live.*Zexportsz*.*.exports.*.*Zmntdevzosd*.*.mntdevz*/mb_groupsz/sys/fs/ldiskfsz/proc/fs/ldiskfsZall_logsz/tmp/lustre-log.*)r   r   Zadd_forbidden_pathZadd_copy_specZ
get_option)r
   r   r   r   Úsetup   sV    û
þþþü
þzLustre.setupN)	Ú__name__Ú
__module__Ú__qualname__Z
short_descZplugin_nameZprofilesZpackagesr   r   r   r   r   r   r      s   	r   N)Zsos.report.pluginsr   r   r   r   r   r   r   Ú<module>	   s   