a >hr @s.ddlZddlmZmZGdddeeZdS)N)Plugin RedHatPluginc@s,eZdZdZdZdZdZddZddZd S) LustrezLustre filesystemlustre)ZstoragenetworkZcluster)rz lustre-clientcCs&|jdd|d|dddS)zZUse lctl get_param to collect a selection of parameters into a file. zlctl get_param  zparams-F)Zsuggest_filenamestderrN)add_cmd_outputjoin)selfnameZ param_listr =/usr/lib/python3.9/site-packages/sos/report/plugins/lustre.py get_paramsszLustre.get_paramscs|gd|dd}dfdd|D}|d||dgd |d d g|d gd |dgd|ddg|dddg|d|ddg|dr|d|ddg|ddgdS)N)zlctl 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|]}t|s|qSr )rematch).0itemZexcluder r +s z Lustre.setup..allZbasic)versionZ health_checkdebugzlfs dfz lfs df -iZ osc_client)zosc.*.max_dirty_mbzosc.*.max_pages_per_rpczosc.*.checksumszosc.*.max_rpcs_in_flightZosd)z9osd-*.*.{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)r rparamsr rrsetups4     z Lustre.setupN) __name__ __module__ __qualname__Z short_descZ plugin_nameZprofilesZpackagesrrr r r rr s  r)rZsos.report.pluginsrrrr r r r s