13.5. Statistics Sub-Collection

Each virtual machine resource exposes a statistics sub-collection for virtual machine-specific statistics. Each statistic contains the following elements:

Table 13.10. Elements for virtual machine statistics

Element Type Description
name string The unique identifier for the statistic entry.
description string A plain text description of the statistic.
unit string The unit or rate to measure the statistical values.
type One of GAUGE or COUNTER The type of statistic measures.
values type= One of INTEGER or DECIMAL The data type for the statistical values that follow.
value complex A data set that contains datum.
datum see values type An individual piece of data from a value.
vm id= relationship A relationship to the containing vm resource.

The following table lists the statistic types for virtual machines.

Table 13.11. Virtual machine statistic types

Name
Description
memory.installed
Total memory in bytes allocated for the virtual machine's use.
memory.used
Current memory in bytes used by the virtual machine.
cpu.current.guest
Percentage of CPU used by the guest.
cpu.current.hypervisor
Percentage of CPU overhead on the hypervisor.
cpu.current.total
Total percentage of the current CPU in use.

Example 13.15. An XML representation of a virtual machine's statistics sub-collection

<statistics>
    <statistic id="ef802239-b74a-329f-9955-be8fea6b50a4"
      href="/api/vms/cdc0b102-fbfe-444a-b9cb-57d2af94f401/
      statistics/ef802239-b74a-329f-9955-be8fea6b50a4">
        <name>memory.installed</name>
        <description>Total memory configured</description>
        <unit>BYTES</unit>
        <type>GUAGE</type>
        <values type="DECIMAL">
            <value>
                <datum>1073741824<datum>
            </value>
        </values>
        <vm id="cdc0b102-fbfe-444a-b9cb-57d2af94f401"
          href="/api/vms/cdc0b102-fbfe-444a-b9cb-57d2af94f401"/>
    </statistic>
    ...
</statistics>

Note

A virtual machine's statistics sub-collection is read-only.