1.1.1. Init and Shutdown

[Administrative]

Describes APIs to Initialize and Shutdown the DCGM Engine.

Functions

dcgmReturn_t dcgmConnect ( char* ipAddress, dcgmHandle_t* pDcgmHandle )
dcgmReturn_t dcgmConnect_v2 ( char* ipAddress, dcgmConnectV2Params_t* connectParams, dcgmHandle_t* pDcgmHandle )
dcgmReturn_t dcgmDisconnect ( dcgmHandle_t pDcgmHandle )
dcgmReturn_t dcgmInit ( void )
dcgmReturn_t dcgmShutdown ( void )
dcgmReturn_t dcgmStartEmbedded ( dcgmOperationMode_t opMode, dcgmHandle_t* pDcgmHandle )
dcgmReturn_t dcgmStartEmbedded_v2 ( dcgmStartEmbeddedV2Params_v1* params )
dcgmReturn_t dcgmStopEmbedded ( dcgmHandle_t pDcgmHandle )

Functions

dcgmReturn_t dcgmConnect ( char* ipAddress, dcgmHandle_t* pDcgmHandle )
Parameters
ipAddress
IN: Valid IP address for the remote host engine to connect to. If ipAddress is specified as x.x.x.x it will attempt to connect to the default port specified by DCGM_HE_PORT_NUMBER If ipAddress is specified as x.x.x.x:yyyy it will attempt to connect to the port specified by yyyy
pDcgmHandle
OUT: DCGM Handle of the remote host engine
Returns

Description

This method is used to connect to a stand-alone host engine process. Remote host engines are started by running the nv-hostengine command.

NOTE: dcgmConnect_v2 provides additional connection options.

dcgmReturn_t dcgmConnect_v2 ( char* ipAddress, dcgmConnectV2Params_t* connectParams, dcgmHandle_t* pDcgmHandle )
Parameters
ipAddress
IN: Valid IP address for the remote host engine to connect to. If ipAddress is specified as x.x.x.x it will attempt to connect to the default port specified by DCGM_HE_PORT_NUMBER. If ipAddress is specified as x.x.x.x:yyyy it will attempt to connect to the port specified by yyyy
connectParams
IN: Additional connection parameters. See dcgmConnectV2Params_t for details.
pDcgmHandle
OUT: DCGM Handle of the remote host engine
Returns

Description

This method is used to connect to a stand-alone host engine process. Remote host engines are started by running the nv-hostengine command.

dcgmReturn_t dcgmDisconnect ( dcgmHandle_t pDcgmHandle )
Parameters
pDcgmHandle
IN: DCGM Handle that came from dcgmConnect
Returns

Description

This method is used to disconnect from a stand-alone host engine process.

dcgmReturn_t dcgmInit ( void )
Returns

Description

This method is used to initialize DCGM within this process. This must be called before dcgmStartEmbedded() or dcgmConnect()

*

dcgmReturn_t dcgmShutdown ( void )
Returns

Description

This method is used to shut down DCGM. Any embedded host engines or remote connections will automatically be shut down as well.

dcgmReturn_t dcgmStartEmbedded ( dcgmOperationMode_t opMode, dcgmHandle_t* pDcgmHandle )
Parameters
opMode
IN: Collect data automatically or manually when asked by the user.
pDcgmHandle
OUT: DCGM Handle to use for API calls
Returns

Description

Start an embedded host engine agent within this process.

The agent is loaded as a shared library. This mode is provided to avoid any extra jitter associated with an additional autonomous agent needs to be managed. In this mode, the user has to periodically call APIs such as dcgmPolicyTrigger and dcgmUpdateAllFields which tells DCGM to wake up and perform data collection and operations needed for policy management.

dcgmReturn_t dcgmStartEmbedded_v2 ( dcgmStartEmbeddedV2Params_v1* params )
Parameters
params
IN/OUT: See dcgmStartEmbeddedV2Params_v1 for details.
Returns

Description

Start an embedded host engine agent within this process.

The agent is loaded as a shared library. This mode is provided to avoid any extra jitter associated with an additional autonomous agent needs to be managed. In this mode, the user has to periodically call APIs such as dcgmPolicyTrigger and dcgmUpdateAllFields which tells DCGM to wake up and perform data collection and operations needed for policy management.

dcgmReturn_t dcgmStopEmbedded ( dcgmHandle_t pDcgmHandle )
Parameters
pDcgmHandle
IN : DCGM Handle of the embedded host engine that came from dcgmStartEmbedded
Returns

Description

Stop the embedded host engine within this process that was started with dcgmStartEmbedded