Bagikan melalui


ShowMetricsByClass method of the CIM_MetricService class

Indicates whether metric collection is enabled for each instance of the specified CIM class, and indicates the metrics that are available for collection for each of those class instances.

Syntax

uint32 ShowMetricsByClass(
  [in]  CIM_ManagedElement       REF Subject,
  [in]  CIM_BaseMetricDefinition REF Definition,
  [out] CIM_BaseMetricDefinition REF DefinitionList[],
  [out] string                       MetricNames[],
  [out] uint16                       MetricCollectionEnabled[]
);

Parameters

Subject [in]

A reference to the managed element that identifies the CIM class for which to retrieve metrics.

Definition [in]

A reference to the metric definition used to filter the class instances for which metrics are reported by this method.

DefinitionList [out]

If this method returns successfully, this parameter contains an array of references to the metric definitions of the metrics that are available for collection for each instance of the class indicated in the Subject parameter.

MetricNames [out]

If this method returns successfully, this parameter contains an array that contains the metric names for each metric definition in the DefinitionList array.

MetricCollectionEnabled [out]

If this method returns successfully, this parameter contains an array that indicates whether metric collection is enabled for each instance of the class indicated by the Subject parameter.

The possible values are:

Enabled (2)

Enable

Disabled (3)

Disable

Reserved (4)

DMTF Reserved

Vendor Reserved

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