3 ܓi@s&ddlmZmZGdddeeZdS))Plugin RedHatPluginc@s$eZdZdZdZd Zd ZddZd S) Vhostmdz)vhostmd virtualization metrics collectionZvhostmdsapvirtsystem virt-whatcCs|jddj}|sdSd|ks2d|ks2d|kr|jdrL|jdddnnd }|j|s^dSxZ|j|D]L}d |krj|jd }|jd |d }d|dkrj|jd |dddqjWdS)Nz virt-whatoutputZvmwareZkvmZxenzvm-dump-metricsZ virt_metrics)Zsuggest_filenamez /sys/blockZ256Krz dd if=/dev/z bs=25 count=1Zmetricz bs=256k count=1)Zcollect_cmd_output splitlinesZ is_installedZadd_cmd_outputZ path_isdirlistdirsplitZexec_cmd)selfZvwhatZsysblockZdiskZdevretr/usr/lib/python3.6/vhostmd.pysetups$      z Vhostmd.setupN)rrr)r)__name__ __module__ __qualname__Z short_descZ plugin_nameZprofilesZpackagesrrrrrr s rN)Zsos.report.pluginsrrrrrrr s