【发布时间】:2011-02-23 09:18:59
【问题描述】:
为什么当我在远程服务器的 CPU 的 LoadPercentage 上运行此查询时,它返回“None”?
import wmi
c = wmi.WMI('192.168.1.11',user='user',password='password')
x = [cpu.LoadPercentage for cpu in c.Win32_Processor()]
print str(x)
返回:'无'
远程服务器是Win7机器。在该特定目标中需要启用什么? 甚至不获取本地机器上的值:c=wmi.WMI()。但是其他属性(例如状态、可用性等)正在显示。 我什至试过c.Win32_PerfFormattedData_PerfOS_Processor class but it didn't acquire any attributes.
【问题讨论】: