Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The CPUUtilizationHistory property contains an array of percentage values that specify the recent CPU use of this virtual machine.
This property is read-only.
Syntax
HRESULT get_CPUUtilizationHistory(
[out] VARIANT *percentageUtilization
);
| VB |
|---|
|
Property value
The recent CPU use of this virtual machine. This use data is returned as a Byte array of 60 elements that represent the percentage of CPU use at each second over the past minute.
This property value is read-only.
Error codes
| Name | Meaning |
|---|---|
|
The operation was successful. |
|
percentageUtilization is NULL. |
|
The virtual machine is not running (array is still returned with all 60 values set to 0 in this case). |
|
An unexpected error occurred. |
Examples
The following example prints the CPUUtilizationHistory 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
i = 1
Wscript.Echo "CPU utilization history:"
For Each intCPUUtilization in colAccountants.CPUUtilizationHistory
Wscript.Echo vbTab & i & " -- " & intCPUUtilization
i = i + 1
Next
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 |
|