ControlSampleTimes method of the Msvm_MetricService class
Sets the control sample times.
Syntax
uint32 ControlSampleTimes(
[in] datetime StartSampleTime,
[in] datetime PreferredSampleInterval,
[in] boolean RestartGathering
);
Parameters
-
StartSampleTime [in]
-
Point in time when sampling for the metrics is to be started.
A value of 99990101000000.000000+000 shall indicate that sampling should start at the next time it is synchronized to the full hour. Sampling is synchronized to the full hour if seconds since midnight modulo sample interval in seconds is equal to 0.
-
PreferredSampleInterval [in]
-
Preferred sample interval time. In order to get correlatable metrics, it is recommended that the sample interval be chosen in a way that 3600 modulo sample interval time in seconds is equal to 0.
It is the responsibility of the CIM metric service implementation to decide whether the requested sample interval time is honored.
The CIM client can check whether or not the metric providers are honoring the requested sample interval time by retrieving related BaseMetricDefinition instances and checking the contents of the "CIM_BaseMetricDefinition.SampleInterval" property.
-
RestartGathering [in]
-
Boolean that when set to TRUE requests that gathering of all metrics associated to the metric service is re-started with this method call.
Return value
This method returns one of the following values:
-
Success (0)
-
Not Supported (1)
-
Failed (2)
-
Method Reserved (..)
-
Vendor Specific (32768..65535)
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 8.1 |
Minimum supported server |
Windows Server 2012 R2 |
Namespace |
Root\virtualization\v2 |
MOF |
|
DLL |
|