Compartir a través de


IVMAccountant interface

The IVMAccountant interface provides access to accounting-related information for a virtual machine.

When to use

The IVMAccountant for a virtual machine can be retrieved using the IVMVirtualMachine::Accountant property.

Members

The IVMAccountant interface inherits from the IDispatch interface. IVMAccountant also has these types of members:

Methods

The IVMAccountant interface has these methods.

Method Description
SetSchedulingParameters Sets the scheduling parameters for a virtual machine.

Properties

The IVMAccountant interface has these properties.

Property Access type Description
AllowableMaximumSystemCapacity
Read-only
The currently allowable maximum percentage of system capacity that can be assigned to this virtual machine.
AllowableReservedSystemCapacity
Read-only
The currently allowable minimum percentage of system capacity that can be reserved for this virtual machine.
CPUUtilization
Read-only
The current CPU use of this virtual machine.
CPUUtilizationHistory
Read-only
An array of percentage values for the recent CPU use of this virtual machine.
DiskBytesRead
Read-only
The total number of bytes read by all IDE and SCSI controllers for this virtual machine.
DiskBytesWritten
Read-only
The total number of bytes written by all IDE and SCSI controllers for this virtual machine.
MaximumSystemCapacity
Read-only
The maximum percentage of system capacity that can be used by this virtual machine.
NetworkBytesReceived
Read-only
The total number of bytes received by all virtual network interface cards for this virtual machine.
NetworkBytesSent
Read-only
The total number of bytes sent by all virtual network interface cards for this virtual machine.
RelativeWeight
Read-only
The relative weight assigned to this virtual machine.
ReservedSystemCapacity
Read-only
The minimum percentage of system capacity assigned to this virtual machine.
UpTime
Read-only
The number of seconds that the virtual machine has been running.

Examples

The following example prints the accountant 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 "Allowable maximum system capacity: " & colAccountants.AllowableMaximumSystemCapacity
        Wscript.Echo "Allowable reserved system capacity: " & colAccountants.AllowableReservedSystemCapacity
        Wscript.Echo "CPU utilization: " & colAccountants.CPUUtilization

        i = 1
        Wscript.Echo "CPU utilization history:"
        For Each intCPUUtilization in colAccountants.CPUUtilizationHistory
            Wscript.Echo vbTab & i & " -- " & intCPUUtilization
            i = i + 1
        Next

        Wscript.Echo "Disk bytes read: " & colAccountants.DiskBytesRead
        Wscript.Echo "Disk bytes written: " & colAccountants.DiskBytesWritten
        Wscript.Echo "Maximum system capacity: " & colAccountants.MaximumSystemCapacity
        Wscript.Echo "Network bytes received: " & colAccountants.NetworkBytesReceived
        Wscript.Echo "Network bytes sent: " & colAccountants.NetworkBytesSent
        Wscript.Echo "Relative weight: " & colAccountants.RelativeWeight
        Wscript.Echo "Reserved system capacity: " & colAccountants.ReservedSystemCapacity
        Wscript.Echo "Uptime: " & colAccountants.Uptime
        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
VsComInterfaces.h

See also

IDispatch