Compartir a través de


ControlMetrics method of the CIM_MetricService class

Enables and disables the collection of metrics. This method controls the collection of each type of metric for the specified managed element, or the collection of a specific metric for the managed element.

Syntax

uint32 ControlMetrics(
  [in] CIM_ManagedElement       REF Subject,
  [in] CIM_BaseMetricDefinition REF Definition,
  [in] uint16                       MetricCollectionEnabled
);

Parameters

Subject [in]

The managed element for which to modify metric collection.

Definition [in]

The definition of the metrics for which to modify metric collection.

MetricCollectionEnabled [in]

Indicates whether metric collection is enabled for the managed element.

The possible values are:

Enable (2)

Disable (3)

Reset (4)

DMTF Reserved

5 32767

Vendor Reserved

32768 65535

Return value

The possible return values are:

Success (0)

Not Supported (1)

Failed (2)

Method Reserved (3 32767)

Vendor Specific (32768 65535)

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2016
Namespace
Root\HyperVCluster\v2
MOF
WindowsHyperVCluster.V2.mof
DLL
VMMS.exe

See also

CIM_MetricService