首先需要在系统中安装SNMP客户端,对于Linux平台来说只需要执行如下配置过程即可....Head = ["HostName","CoreLoad","CpuUser","CpuSystem","CpuIdle"]
CPU = []
ret = os.popen..." + addr + " .1.3.6.1.2.1.1.5")
CPU.append(ret.read().split(":")[3].strip())
ret = os.popen...CPU.append(ret.read().split(":")[3].strip())
for i in [9,10,11]:
ret = os.popen...):
try:
Head = ["HostName","Load1","Load5","Load15"]
SysLoad = []
ret = os.popen