Current File : //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/lustre.cpython-36.pyc
3

\��hr�@s.ddlZddlmZmZGdd�dee�ZdS)�N)�Plugin�RedHatPluginc@s,eZdZdZdZdZd
Zdd�Zd	d
�ZdS)�LustrezLustre filesystem�lustre�storage�network�cluster�
lustre-clientcCs&|jddj|���d|��dd�dS)zZUse lctl get_param to collect a selection of parameters into a
            file.

        zlctl get_param � zparams-F)Zsuggest_filename�stderrN)�add_cmd_output�join)�self�nameZ
param_list�r�/usr/lib/python3.6/lustre.py�
get_paramsszLustre.get_paramscs�|jdddddg�|jd�d}d��fd	d
�|j�D�}|jd|�|jdd
ddg�|jddg�|jdddddg�|jddddg�|jddg�|jdddg�|jd �|jd!d"g�|jd#�r�|jd$�|jd%d&g�|jd'd'g�dS)(Nzlctl debug_kernelzlctl device_listzlctl list_nidszlctl route_listzlnetctl net show -v 4zlctl list_param -R *�outputzn.*@.*|.*dump_page_cache|peers|.*quota.*|osd-.*|.*osc.*|mgs.*|.*mgc_irstate|ldlm.*state|.*job_stats|.*exports.*csg|]}tj�|�s|�qSr)�re�match)�.0�item)�excluderr�
<listcomp>+sz Lustre.setup.<locals>.<listcomp>�allZbasic�versionZhealth_check�debugzlfs dfz	lfs df -iZ
osc_clientzosc.*.max_dirty_mbzosc.*.max_pages_per_rpczosc.*.checksumszosc.*.max_rpcs_in_flightZosdz9osd-*.*.{blocksize,brw_stats,enable_projid_xattr,extent*}z8osd-*.*.{fallocate_*,full_scrub_*,files*,kbytes*,mntdev}z7osd-*.*.{nonrotational,oi_scrub,pdo,stats,read*,write*}Zquotaz)osd-*.*.quota_slave.{info,limit_*,acct_*}Zmgszmgs.MGS.ir_timeoutzmgs.MGS.live.*z*/mb_groupsz/sys/fs/ldiskfsz/proc/fs/ldiskfsZall_logsz/tmp/lustre-log.*z	job-statsz
*.*.job_statsZpeers)rZexec_cmd�
splitlinesrZadd_forbidden_pathZ
add_copy_specZ
get_option)rrZparamsr)rr�setupsF


zLustre.setupN)rrr)rr	)	�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackagesrrrrrrr
s	r)rZsos.report.pluginsrrrrrrr�<module>	s