[英]How to Get Hard Drive Memory and CPU Usage of a VM Using Powershell
Is it possible to get the hard drive memory and CPU usage of a virtual machine without going inside the VM itself? 是否可以在不进入VM本身的情况下获取虚拟机的硬盘驱动器内存和CPU使用率? If I use Get-VM | fl *
如果我使用Get-VM | fl *
Get-VM | fl *
to get all the available properties, I do not find any that resemble the HD memory or the CPU usage. Get-VM | fl *
获取所有可用属性,我没有发现任何类似于高清内存或CPU使用情况。
Thanks in advance for the help! 先谢谢您的帮助!
Have a look at Measure-VM and its 'requirement' Enable-VMResourceMetering 看看Measure-VM及其“要求” Enable-VMResourceMetering
So essentially to enable it for all VMs you can execute 因此,基本上可以为您可以执行的所有VM启用它
Get-VM | Enable-VMResourceMetering
and then to get actual resource metrics for the VMs you can execute 然后获取可以执行的VM的实际资源指标
Get-VM | Measure-VM
Of course you can also disable it again with Disable-VMResourceMetering 当然,您也可以使用Disable-VMResourceMetering再次禁用它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.