# Managed Object - PerformanceManager(vim.PerformanceManager)

Property of
  ServiceContent
See also
  PerfCompositeMetric, PerfCounterInfo, PerfEntityMetricBase, PerfInterval, PerfMetricId, PerformanceDescription, PerformanceManagerCounterLevelMapping, PerfProviderSummary, PerfQuerySpec

## Managed Object Description

This managed object type provides the service interface for obtaining statistical data about various aspects of system performance, as generated and maintained by the system's performance providers. A "performance provider" (PerfProviderSummary) is any managed object that generates utilization or other performance metrics. Performance providers include managed entities, such as hosts, virtual machines, compute resources, resource pools, datastores, and networks. Performance providers also include physical or virtual devices associated with these objects, such as virtual host-bus adapters and network-interface controllers (NICs)

Performance Counters
Each performance provider—the instrumented device or entity—has its own set of counters that provides metadata about its available metrics. Each counter has a unique key, referred to as the counterId. The actual performance metrics generated at runtime are identified by this counterId. Counters are organized by groups of finite system resources, such as memory, CPU, disk, and so on. The links in this list contain documentation for performance counters, by group. Each page contains a table that includes data extracted from instances of the PerfCounterInfo data object, including the counter name, its Label, Unit, StatsType, RollupType, and Level:

- Cluster Services
- CPU
- Host-Based Replication
- Management Agent
- Memory
- Network
- Power
- Resource Scheduler
- Storage Capacity:
  - Datastore / Virtual Machine
- Storage I/O:
  - Datastore
  - Disk
  - Virtual Disk
  - Storage Adapter
  - Storage Path
- System
- vCenter Resource
- Virtual Machine Operations

Other performance-counter groups, in addition to those listed here, exist on the system. However, only the counter groups listed are considered of possible interest to third-party developers.

Obtaining Metadata and Metrics
This interface provides these query operations:

- QueryPerfProviderSummary, for obtaining metatdata about performance providers
- QueryPerfCounter and QueryPerfCounterByLevel for obtaining metadata about supported counters.
- QueryPerf, QueryAvailablePerfMetric, and QueryPerfComposite for obtaining statistics for one or more entities:
  - Use QueryPerf to obtain metrics for multiple entities in a single call.
  - Use QueryPerfComposite to obtain statistics for a single entity with its descendent objects—statistics for a host and all its virtual machines, for example.

Product and Version Specifics
Some differences between ESX and vCenter Server implementations of this interface include:

- For ESX systems, this interface provides access to real-time data, and to real-time data that has been rolled up into "PastDay" statistics (if applicable for the specific counter).
- For vCenter Server systems, this interface provides access to real-time and historical data. vCenter Server collects statistics on a regular basis from all ESX systems that it manages, and aggregates the results based on the level settings for the server.
- Default sampling interval is product- and version-specific:
  - ESX 3.x (and subsequent) systems: 20 second interval
  - ESX 2.x systems: 60 second interval
- VirtualCenter Server 2.5 (and subsequent vCenter Server) systems initially collect statistics data 10 minutes after system startup, and then hourly thereafter.

See the Programming Guide for more information about using PerformanceManager.

Properties

Name | Type | Description
--- | --- | ---
description P | PerformanceDescription | The static description strings.
historicalInterval* P | PerfInterval[] | A list of intervals configured on the system.
perfCounter* P | PerfCounterInfo[] | A list of all supported performance counters in the system.

*May not be present P Required privilege: System.View

Methods

Methods defined in this Managed Object
CreatePerfInterval, QueryAvailablePerfMetric, QueryPerf, QueryPerfComposite, QueryPerfCounter, QueryPerfCounterByLevel, QueryPerfProviderSummary, RemovePerfInterval, ResetCounterLevelMapping, UpdateCounterLevelMapping, UpdatePerfInterval

# CreatePerfInterval(createHistoricalInterval)

Deprecated. As of API 2.5, use UpdatePerfInterval. The default historical intervals can be modified, but they cannot be created.

Adds a new historical interval. Sampling period for new interval must be a multiple of an existing interval; must comprise a longer period of time; and must be uniquely named.

Required Privileges
  Performance.ModifyIntervals

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the PerformanceManager used to make the method call.
intervalId | PerfInterval | A custom interval, specified as the number of seconds to hold data in the database, a user-specified unique name, and a sampling period (in seconds).

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
InvalidArgument | Thrown if the set of arguments passed to the function is not specified correctly.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="CreatePerfInterval" type="pbm:CreatePerfIntervalRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="CreatePerfIntervalResponse"> <complexType/> </element>

# QueryAvailablePerfMetric(queryAvailableMetric)

Retrieves all performance counters for the specified managed object generated during a specified period of time. The time period can be specified using beginTime, endTime, or by interval ID.

Required Privileges
  System.Read

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the PerformanceManager used to make the method call.
entity | ManagedObjectReference | The managed object that provides performance metrics.
beginTime* | xsd:dateTime | Starting time (server time) for a period of time from which to return available metrics. If not specified, defaults to oldest available metric for the specified entity.
endTime* | xsd:dateTime | Ending time (server time) for a period of time from which to return available performance metrics. If not specified, defaults to the most recently generated metric for the specified entity.
intervalId* | xsd:int | Period of time from which to retrieve metrics, defined by intervalId (rather than beginTime or endTime). Valid intervalIds include: For real-time counters, the refreshRate of the performance provider. For historical counters, the samplingPeriod of the historical interval. If this parameter is not specified, the system returns available metrics for historical statistics.

*Need not be set

Return Value

Type | Description
--- | ---
PerfMetricId[] | An array of metrics, each of which comprises a counterId and an name.

Faults

Type | Description
--- | ---
InvalidArgument | Thrown if the set of arguments passed to the function is not specified correctly.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="QueryAvailablePerfMetric" type="pbm:QueryAvailablePerfMetricRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="QueryAvailablePerfMetricResponse"> <complexType> <sequence> <element name="returnval" type="pbm:PerfMetricId" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryPerf(queryStats)

Retrieves the performance metrics for the specified entity (or entities) based on the properties specified in the PerfQuerySpec data object.

Query Performance for VirtualCenter Server

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the PerformanceManager used to make the method call.
querySpec | PerfQuerySpec[] | An array of PerfQuerySpec objects. Each PerfQuerySpec object specifies a managed object reference for an entity, plus optional criteria for filtering results. Only metrics for entities that can be resolved and that are valid performance providers are returned in any result. Each PerfQuerySpec object in the array submitted in this operation can query for different metrics. Or, select all types of statistics for a single managed entity. Raw data feed workaround: Normally, QueryPerf will return performance statistics stored in the VirtualCenter database. However this may not be suitable for certain applications. For example, applications that treat VirtualCenter as a raw data source, query for performance statistics regularly (say every 5 minutes) and extract the data for external archival and reporting. Such applications need better query performance. These applications should query statistics using QueryPerf for the base historical interval (5 minutes by default) having a start and end time range within 30 minutes from the current VirtualCenter server system time. These QueryPerf calls will have better performance than other QueryPerf calls.

Return Value

Type | Description
--- | ---
PerfEntityMetricBase[] | The metric values for the specified entity or entities.

Faults

Type | Description
--- | ---
InvalidArgument | Thrown if the set of arguments passed to the function is not specified correctly.
RestrictedByAdministrator | Thrown if the number of inventory objects needed to execute the request exceeds a predefined limit.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="QueryPerf" type="pbm:QueryPerfRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="QueryPerfResponse"> <complexType> <sequence> <element name="returnval" type="pbm:PerfEntityMetricBase" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryPerfComposite(queryCompositeStats)

Retrieves a PerfCompositeMetric data object that comprises statistics for the specified entity and its children entities. Only metrics for the first level of descendents are included in the PerfCompositeMetric object.

Use this operation to obtain statistics for a host and its associated virtual machines, for example.

Requires system.read privilege for every virtual machine on the target host, or the query fails with the “NoPermission” fault. Suported for HostSystem managed entities only.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the PerformanceManager used to make the method call.
querySpec | PerfQuerySpec | A PerfQuerySpec object specifying the query parameters. This PerfQuerySpec object specifies a managed object for which composite statistics should be retrieved, with specific optional criteria for filtering the results. This PerfQuerySpec requires a valid metricId property that specifies a metric that is available, in common, to the entity and its children. If the specified metricId is not available to the entity and its children, it is ignored.

Return Value

Type | Description
--- | ---
PerfCompositeMetric | The metric values for the specified entity and its associated entities for a single interval.

Faults

Type | Description
--- | ---
InvalidArgument | Thrown if the set of arguments passed to the function is not specified correctly.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="QueryPerfComposite" type="pbm:QueryPerfCompositeRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="QueryPerfCompositeResponse"> <complexType> <sequence> <element name="returnval" type="pbm:PerfCompositeMetric"/> </sequence> </complexType> </element>

# QueryPerfCounter(queryCounter)

Retrieves counter information for the specified list of counter IDs.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the PerformanceManager used to make the method call.
counterId | xsd:int[] | An array of one or more counterIds representing performance counters for which information is being retrieved.

Return Value

Type | Description
--- | ---
PerfCounterInfo[] | An array consisting of performance counter information for the specified counterIds.

Faults

Type | Description
--- | ---
InvalidArgument | Thrown if the set of arguments passed to the function is not specified correctly.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="QueryPerfCounter" type="pbm:QueryPerfCounterRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="QueryPerfCounterResponse"> <complexType> <sequence> <element name="returnval" type="pbm:PerfCounterInfo" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryPerfCounterByLevel(queryCounterByLevel)

Retrieves the set of counters that are available at a specified collection level. The collection level determines the statistics that get stored in VirtualCenter. See PerfInterval for more information about VirtualCenter Server historical statistics collection.

Required Privileges
  System.View
Since
  VI API 2.5

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the PerformanceManager used to make the method call.
level | xsd:int | A number between 1 and 4 that specifies the collection level.

Return Value

Type | Description
--- | ---
PerfCounterInfo[] | An array of PerfCounterInfo objects that define the set of counters having the specified level number available for the entity.

Faults

Type | Description
--- | ---
InvalidArgument | Thrown if an invalid level is specified.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="QueryPerfCounterByLevel" type="pbm:QueryPerfCounterByLevelRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="QueryPerfCounterByLevelResponse"> <complexType> <sequence> <element name="returnval" type="pbm:PerfCounterInfo" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryPerfProviderSummary(queryProviderSummary)

Retrieves the PerfProviderSummary data object that defines the capabilities of the specified managed object with respect to statistics, such as whether it supports current or summary statistics.

Required Privileges
  System.Read

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the PerformanceManager used to make the method call.
entity | ManagedObjectReference | Reference to a managed object that provides performance data. If the entity specified by managed object reference is not a performance provider, an "InvalidArgument" exception is thrown.

Return Value

Type | Description
--- | ---
PerfProviderSummary | A data object containing metadata about the entity as a performance provider, such as the type of metrics (real-time, summary, or both) it generates and the refreshRate.

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="QueryPerfProviderSummary" type="pbm:QueryPerfProviderSummaryRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="QueryPerfProviderSummaryResponse"> <complexType> <sequence> <element name="returnval" type="pbm:PerfProviderSummary"/> </sequence> </complexType> </element>

# RemovePerfInterval(removeHistoricalInterval)

Deprecated. As of API 2.5, use UpdatePerfInterval. Historical intervals cannot be removed.

Removes an interval from the list.

Required Privileges
  Performance.ModifyIntervals

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the PerformanceManager used to make the method call.
samplePeriod | xsd:int | The sampling period, in seconds, for the specified interval being removed.

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
InvalidArgument | Thrown if the set of arguments passed to the function is not specified correctly.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="RemovePerfInterval" type="pbm:RemovePerfIntervalRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="RemovePerfIntervalResponse"> <complexType/> </element>

# ResetCounterLevelMapping(resetCounterLevelMapping)

Restores a set of performance counters to the default level of data collection. See the performance counter tables for the default collection level for individual counters.

Required Privileges
  Performance.ModifyIntervals
Since
  vSphere API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the PerformanceManager used to make the method call.
counters | xsd:int[] | An array of counter ids.

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
InvalidArgument | Thrown if the passed in counterId is invalid.
NotSupported | Thrown if called directly on a host.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="ResetCounterLevelMapping" type="pbm:ResetCounterLevelMappingRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="ResetCounterLevelMappingResponse"> <complexType/> </element>

# UpdateCounterLevelMapping(updateCounterLevelMapping)

Changes the level of data collection for a set of performance counters. See the performance counter tables for the default collection level for individual counters.

Important:

Consider the performance and storage consequences of using this method. You may cause a significant increase in data collection and storage, along with a corresponding decrease in performance. vCenter Server performance and database storage requirements depend on the collection levels defined for the performance intervals (PerformanceManager.historicalInterval) and the collection levels specified for individual performance counters (PerfCounterInfo.level).

Performance Counter Data Collection

vSphere defines four levels of data collection for performance counters. Each performance counter specifies a level for collection. The historical performance intervals (PerformanceManager.historicalInterval) define the sampling period and length for a particular collection level.

The amount of data collected for a performance counter depends on the performance interval and on the type of entity for which the counter is defined. For example, a datastore counter such as datastoreIops (the aggregate number of IO operations on the datastore) will generate a data set that corresponds to the number of datastores on a host. If a vCenter Server manages a large number of hosts with a large number of datastores, the Server will collect a large amount of data.

There are other counters for which the vCenter Server collects a relatively smaller amount of data. For example, memory counters are collected as a single counter per virtual machine and a single counter per host.

Performance Counter Data Storage

The performance interval collection level defines the set of counters for which the vCenter Server stores performance data. The Server will store data for counters at the specified level and for counters at all lower levels.

By default, all the performance intervals specify collection level one. Using these defaults, the vCenter Server stores performance counter data in the vCenter database for all counters that specify collection level one. It does not store data for counters that specify collection levels two through four.

Performance Manager Method Interaction

You can use the UpdateCounterLevelMapping method to change the collection level for individual counters. You can also use the UpdatePerfInterval method to change the collection level for the system-defined performance intervals. These methods can cause a significant increase in the amount of data collected and stored in the vCenter database.

You may cause a significant increase in data collection and storage along with a corresponding decrease in performance under the following conditions:

- By default the system-defined performance intervals use collection level one, storing data for all counters that specify collection level one. If you use the UpdateCounterLevelMapping method to change the collection level of performance counters to level one, you will increase the amount of stored performance data.
- If you use the UpdatePerfInterval method to increase the collection level for the system-defined performance intervals, you will increase the amount of stored performance data.

To restore counter levels to default settings use the ResetCounterLevelMapping method.

Required Privileges
  Performance.ModifyIntervals
Since
  vSphere API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the PerformanceManager used to make the method call.
counterLevelMap | PerformanceManagerCounterLevelMapping[] | An array of PerformanceManagerCounterLevelMapping objects. The levels for the counters passed in are changed to the passed in values. If the optional aggregateLevel field is left unset then only the perDeviceLevel is configured. If the optional perDeviceLevel is left unset then only the aggregateLevel is configured. If there are multiple entries in the passed in array for the same counterId being updated then the last entry containing the counterId takes effect.

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
InvalidArgument | Thrown if the passed in counterId is invalid or if both the aggregateLevel and perDeviceLevel are unset or if the aggregateLevel field is not between 1-4 (valid values).
NotSupported | Thrown if called directly on a host.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="UpdateCounterLevelMapping" type="pbm:UpdateCounterLevelMappingRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="UpdateCounterLevelMappingResponse"> <complexType/> </element>

# UpdatePerfInterval(updateHistoricalInterval)

Modifies VirtualCenter Server's built-in historical intervals, within certain limits.

Supported Modifications

key | samplingPeriod | length | name | level [1] | enabled [2]
--- | --- | --- | --- | --- | ---
1 | 300 [3] | 86400 [4] | Past day | 1 | true
2 | 1800 | 604800 | Past week | 1 | true
3 | 7200 | 2592000 | Past month | 1 | true
4 | 86400 | 31536000 [5] | Past year | 1 | true

[1] The collection level for the historical intervals can be changed. However, the level specified for a lower-numbered interval cannot be smaller than that of a larger interval.
[2] An interval can be disabled. By default, all four intervals are enabled. Disabling an interval disables all higher intervals. For example, disabling interval 3 (“Past month”) also disables interval 4 (“Past year”).
[3] Can reduce this interval’s samplingPeriod from 5 minutes to 1, 2, or 3 minutes.
[4] Can increase this interval’s length from 1 day to 2 or 3 days.
[5] Can increase interval’s length from 1 year to 2 or 3 years.

See PerfInterval for information about the four default intervals for VirtualCenter Server.

Required Privileges
  Performance.ModifyIntervals

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the PerformanceManager used to make the method call.
interval | PerfInterval | The historical interval being modified, a complete data object comprising values for enabled, interval ID, length of time to maintain statistics for this interval in the database, level, name, and samplingPeriod properties.

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
InvalidArgument | Thrown if the set of arguments passed to the function is not specified correctly or if the update does not conform to the rules mentioned above.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="UpdatePerfInterval" type="pbm:UpdatePerfIntervalRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="UpdatePerfIntervalResponse"> <complexType/> </element>