ControlMetricsByClass method of the CIM_MetricService class

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

Syntax

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

Parameters

Subject [in]

The class 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 class.

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