当我在 windows7 上使用 vmware powercli 从 ESXi 获取统计信息时,它给了我响应 Wondows7 命令:PowerCLI C:\temp>
Get-VMHost -Name "hostname.inc.com" | Get-Stat -Stat
cpu.usage.average -Start (Get-Date).AddDays(-1) -Finish(Get-Date) -MaxSamples 100
返回输出
MetricId Timestamp Value Unit Insta
nce
-------- --------- ----- ---- -----
cpu.usage.average 31.10.2013 15:40:00 25,03 %
cpu.usage.average 31.10.2013 15:35:00 22,95 %
cpu.usage.average 31.10.2013 15:30:00 23,97 %
...
当从 Windows2008r2 命令:PowerCLI C:\temp>
Get-VMHost -Name "hostname.inc.com" | Get-Stat -Stat
cpu.usage.average -Start (Get-Date).AddDays(-1) -Finish(Get-Date) -MaxSamples 100
返回“无”
有趣 - 如果在 windows2008r2 命令上运行:PowerCLI C:\temp>
Get-VMHost -Name "hostname.inc.com" | Get-Stat -Stat
cpu.usage.average -Realtime -MaxSamples 100
它给出了回应
cpu.usage.average 10/31/2013 9:49:40 AM 9.77 % 30
cpu.usage.average 10/31/2013 9:49:20 AM 8.63 % 30
cpu.usage.average 10/31/2013 9:49:00 AM 12.05 % 30
cpu.usage.average 10/31/2013 9:48:40 AM 11.5 % 30
cpu.usage.average 10/31/2013 9:48:20 AM 14.25 % 30
cpu.usage.average 10/31/2013 9:48:00 AM 11.02 % 30
cpu.usage.average 10/31/2013 9:47:40 AM 11.77 % 30