IVMAccountant::CPUUtilization property
The CPUUtilization property contains the current CPU use of this virtual machine.
This property is read-only.
Syntax
HRESULT get_CPUUtilization(
[out] long *percentageUtilization
);
VB |
---|
|
Property value
The current CPU use percentage of this virtual machine.
This property value is read-only.
Error codes
Name | Meaning |
---|---|
|
The operation was successful. |
|
percentageUtilization is NULL. |
|
The virtual machine is not running. |
|
An unexpected error occurred. |
Examples
The following example prints the CPUUtilization property information for each virtual machine.
Set objVS = CreateObject("VirtualServer.Application")
set colVMs = objVS.VirtualMachines
For Each objVM in colVMS
Set colAccountants = objVM.Accountant
Wscript.Echo "Virtual machine: " & objVM.Name
Wscript.Echo "CPU utilization: " & colAccountants.CPUUtilization
Wscript.Echo
Next
Requirements
Product |
Microsoft Virtual Server 2005 onWindows Server 2003 |
Download |
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003 |
Header |
|