Metadata¶
- group DCGMAPI_METADATA
This chapter describes the methods that query for DCGM metadata.
Functions
-
dcgmReturn_t dcgmIntrospectToggleState(dcgmHandle_t pDcgmHandle, dcgmIntrospectState_t enabledState)¶
Toggle the state of introspection metadata gathering in DCGM.
Metadata gathering will increase the memory usage of DCGM so that it can store the metadata it gathers.
- Parameters
pDcgmHandle – IN: DCGM Handle
enabledState – IN: The state to set gathering of introspection data to
- Returns
DCGM_ST_OK if the call was successful
DCGM_ST_BADPARAM enabledState is an invalid state for metadata gathering
-
dcgmReturn_t dcgmIntrospectGetFieldsMemoryUsage(dcgmHandle_t pDcgmHandle, dcgmIntrospectContext_t *context, dcgmIntrospectFullMemory_t *memoryInfo, int waitIfNoData)¶
Get the current amount of memory used to store the given field collection.
- Parameters
pDcgmHandle – IN: DCGM Handle
context – IN: see dcgmIntrospectContext_t. This identifies the level of fields to do introspection for (ex: all fields, field groups) context->version must be set to dcgmIntrospectContext_version prior to this call.
memoryInfo – IN/OUT: see dcgmIntrospectFullMemory_t. memoryInfo->version must be set to dcgmIntrospectFullMemory_version prior to this call.
waitIfNoData – IN: if no metadata has been gathered, should this call block until data has been gathered (1), or should this call just return DCGM_ST_NO_DATA (0).
- Returns
DCGM_ST_OK if the call was successful
DCGM_ST_NOT_CONFIGURED if metadata gathering state is DCGM_INTROSPECT_STATE_DISABLED
DCGM_ST_NO_DATA if waitIfNoData is false and metadata has not been gathered yet
DCGM_ST_VER_MISMATCH if context->version or memoryInfo->version is 0 or invalid.
-
dcgmReturn_t dcgmIntrospectGetHostengineMemoryUsage(dcgmHandle_t pDcgmHandle, dcgmIntrospectMemory_t *memoryInfo, int waitIfNoData)¶
Retrieve the total amount of memory that the hostengine process is currently using.
This measurement represents both the resident set size (what is currently in RAM) and the swapped memory that belongs to the process.
- Parameters
pDcgmHandle – IN: DCGM Handle
memoryInfo – IN/OUT: see dcgmIntrospectMemory_t. memoryInfo->version must be set to dcgmIntrospectMemory_version prior to this call.
waitIfNoData – IN: if no metadata is gathered wait till this occurs (!0) or return DCGM_ST_NO_DATA (0)
- Returns
DCGM_ST_OK if the call was successful
DCGM_ST_NOT_CONFIGURED if metadata gathering state is DCGM_INTROSPECT_STATE_DISABLED
DCGM_ST_NO_DATA if waitIfNoData is false and metadata has not been gathered yet
DCGM_ST_VER_MISMATCH if memoryInfo->version is 0 or invalid.
-
dcgmReturn_t dcgmIntrospectGetFieldsExecTime(dcgmHandle_t pDcgmHandle, dcgmIntrospectContext_t *context, dcgmIntrospectFullFieldsExecTime_t *execTime, int waitIfNoData)¶
Get introspection info relating to execution time needed to update the fields identified by context.
- Parameters
pDcgmHandle – IN: DCGM Handle
context – IN: see dcgmIntrospectContext_t. This identifies the level of fields to do introspection for (ex: all fields, field group ) context->version must be set to dcgmIntrospectContext_version prior to this call.
execTime – IN/OUT: see dcgmIntrospectFullFieldsExecTime_t. execTime->version must be set to dcgmIntrospectFullFieldsExecTime_version prior to this call.
waitIfNoData – IN: if no metadata is gathered, wait until data has been gathered (1) or return DCGM_ST_NO_DATA (0)
- Returns
DCGM_ST_OK if the call was successful
DCGM_ST_NOT_CONFIGURED if metadata gathering state is DCGM_INTROSPECT_STATE_DISABLED
DCGM_ST_NO_DATA if waitIfNoData is false and metadata has not been gathered yet
DCGM_ST_VER_MISMATCH if context->version or execTime->version is 0 or invalid.
-
dcgmReturn_t dcgmIntrospectGetHostengineCpuUtilization(dcgmHandle_t pDcgmHandle, dcgmIntrospectCpuUtil_t *cpuUtil, int waitIfNoData)¶
Retrieve the CPU utilization of the DCGM hostengine process.
- Parameters
pDcgmHandle – IN: DCGM Handle
cpuUtil – IN/OUT: see dcgmIntrospectCpuUtil_t. cpuUtil->version must be set to dcgmIntrospectCpuUtil_version prior to this call.
waitIfNoData – IN: if no metadata is gathered wait till this occurs (!0) or return DCGM_ST_NO_DATA (0)
- Returns
DCGM_ST_OK if the call was successful
DCGM_ST_NOT_CONFIGURED if metadata gathering state is DCGM_INTROSPECT_STATE_DISABLED
DCGM_ST_NO_DATA if waitIfNoData is false and metadata has not been gathered yet
DCGM_ST_VER_MISMATCH if cpuUtil->version or execTime->version is 0 or invalid.
-
dcgmReturn_t dcgmIntrospectUpdateAll(dcgmHandle_t pDcgmHandle, int waitForUpdate)¶
This method is used to manually tell the the introspection module to update all DCGM introspection data.
This is normally performed automatically on an interval of 1 second.
- Parameters
pDcgmHandle – IN: DCGM Handle
waitForUpdate – IN: Whether or not to wait for the update loop to complete before returning to the caller
- Returns
DCGM_ST_OK if the call was successful
DCGM_ST_BADPARAM if waitForUpdate is invalid
-
dcgmReturn_t dcgmIntrospectToggleState(dcgmHandle_t pDcgmHandle, dcgmIntrospectState_t enabledState)¶