Manage DCGM (v1.5)
1. Overview
PPU DCGM is a tool suite for managing and monitoring PPUs in clusters and data centers. Based on the open-source DCGM, it includes the following components:
dcgmi command-line tool
nv-hostengine command-line tool
DCGM shared library
dcgm-exporter tool
2. Download and Installation
The PPU DCGM tool is distributed as a separate toolkit. Click the download link to download it from the PPU artifactory page.
You need a username and password to download the package. Contact your account manager (PDSA) to get them.
The installation package contains the following:
RPM and DEB installation packages for PPU DCGM
The hgdcgm-exporter directory
Installing PPU DCGM requires the following:
PPU driver installed
PPU SDK installed
root permissions (some features are unavailable without root permissions)
2.1 Uninstall old versions of PPU DCGM
Use the correct command for your privilege level:
# Stop nv-hostengine with root permissions
sudo nv-hostengine -t
# To stop without root permissions, use the same path to nvhostengine.pid that was used to start it.
nv-hostengine -t --pid <your path>/nvhostengine.pid
# If you installed using a DEB package (Ubuntu)
sudo dpkg -r datacenter-gpu-manager
# If you installed using an RPM package (CentOS)
sudo rpm -e datacenter-gpu-manager2.2 Install the PPU DCGM package
# Starting with version 3.0.8, DCGM is a single, unified installation package, replacing the separate PCIe and OAM packages.
# The following example is for version 3.0.9:
# If using a DEB package (Ubuntu)
sudo dpkg -i --force-overwrite datacenter-gpu-manager_3.0.9_amd64.deb
# If using an RPM package (CentOS)
sudo rpm --force -ivh --nodeps datacenter-gpu-manager-3.0.9-1-x86_64.rpm2.3 Install dependencies
The PPU DCGM runtime environment requires the following software:
On APT-based Linux distributions, such as Ubuntu and Debian, run the following commands to install lspci:
sudo apt-get update sudo apt-get install pciutilsOn YUM-based Linux distributions, such as CentOS and Red Hat, run the following commands to install lspci:
sudo yum makecache sudo yum install pciutils
2.4 Start the PPU DCGM service
Use the correct command for your privilege level:
# Start the PPU DCGM background service with root permissions
nv-hostengine
# To run without root permissions, specify the path to nvhostengine.pid.
# Command: nv-hostengine --pid <your path>/nvhostengine.pid
# Example: nv-hostengine --pid /work/test/nvhostengine.pidRun dcgmi discovery -l to verify that PPU DCGM is running correctly:
root@be1816e3958c:~# dcgmi discovery -l
2 GPUs found.
+--------+----------------------------------------------------------------------+
| GPU ID | Device Information |
+--------+----------------------------------------------------------------------+
| 0 | Name: PPU |
| | PCI Bus ID: 00000000:10:00.0 |
| | Device UUID: GPU-019ea108-c110-0828-0000-00002062b161 |
+--------+----------------------------------------------------------------------+
| 1 | Name: PPU |
| | PCI Bus ID: 00000000:11:00.0 |
| | Device UUID: GPU-019ea108-c120-040c-0000-0000c007e820 |
+--------+----------------------------------------------------------------------+
...3. DCGMI CLI
Dcgmi is an interactive command-line query tool that communicates with nv-hostengine to collect and display relevant data.
Before using the dcgmi tool, start the nv-hostengine service. Note that some features require root permissions and will be unavailable otherwise.
# Starts the DCGM background service with root permission
nv-hostengine
# To run with non-root permission, specify the path to nvhostengine.pid
nv-hostengine --pid <your path>/nvhostengine.piddcgmi supports multiple subcommands. Run dcgmi -h for help information:
root@be1816e3958c:~# dcgmi -h
Usage: dcgmi
dcgmi subsystem
dcgmi -v
Flags:
-v vv Shows DCGMI version information
subsystem The subsystem to use.
Subsystems Available:
topo Displays the GPU topology [dcgmi topo -h for more info]
stats Displays process statistics [dcgmi stats -h for more info]
diag Runs system validation and diagnostics [dcgmi diag -h for more info]
policy Manages policies [dcgmi policy -h for more info]
health Monitors system health [dcgmi health -h for more info]
config Manages GPU configuration [dcgmi config -h for more info]
group Manages GPU groups [dcgmi group -h for more info]
fieldgroup Manages field groups [dcgmi fieldgroup -h for more info]
discovery Discovers GPUs on the system [dcgmi discovery -h for more info]
nvlink Displays NvLink link statuses and error counts [dcgmi nvlink -h for more info]
dmon Monitors GPU statistics [dcgmi dmon -h for more info]
modules Controls and lists DCGM modules
profile Controls and lists DCGM profiling metrics
-- ignore_rest Ignores the rest of the labeled arguments following this
flag.
--version Displays version information and exits.
-h --help Displays usage information and exits.
...3.1 Discover devices (discovery)
Use the discovery subcommand to list PPU devices and view their status information.
Run dcgmi discovery -h to view the help information:
root@be1816e3958c:~# dcgmi discovery -h
discovery -- Used to discover and identify GPUs and their attributes.
Usage: dcgmi discovery
dcgmi discovery --host <IP/FQDN> -l
dcgmi discovery --host <IP/FQDN> -i <flags> -g <groupId> -v
dcgmi discovery -c
Flags:
-g --group groupId The group ID to query.
--host IP/FQDN Connects to specified IP or fully-qualified domain
name. To connect to a host engine that was
started with -d (unix socket), prefix the unix
socket filename with 'unix://'. [default =
localhost]
-l --list List all GPUs discovered on the host.
-i --info flags Specify which information to return. [default =
atp]
a - device info
p - power limits
t - thermal limits
c - clocks
-c --compute-hierarchy List all of the gpu instances and compute
instances
...3.1.1 List devices
Run dcgmi discovery -l to list PPU devices. The output includes information such as the device name, PCI Bus ID, and UUID:
root@be1816e3958c:~# dcgmi discovery -l
2 GPUs found.
+--------+----------------------------------------------------------------------+
| GPU ID | Device Information |
+--------+----------------------------------------------------------------------+
| 0 | Name: PPU |
| | PCI Bus ID: 00000000:10:00.0 |
| | Device UUID: GPU-019ea108-c110-0828-0000-00002062b161 |
+--------+----------------------------------------------------------------------+
| 1 | Name: PPU |
| | PCI Bus ID: 00000000:11:00.0 |
| | Device UUID: GPU-019ea108-c120-040c-0000-0000c007e820 |
+--------+----------------------------------------------------------------------+
...3.1.2 View status information
Use the -i option to view device status information. The value passed to the -i parameter determines which information is displayed:
| Description |
a | device information |
p | power limit |
t | thermal limit |
c | clock information |
For example, run dcgmi discovery -i p to view the device power limit. By default, if a GPU group is not specified with the -g option, the command aggregates and displays the status information for all PPUs:
root@be1816e3958c:~# dcgmi discovery -i p
+--------------------------+-------------------------------------------------+
| Group of 2 GPUs | Device Information |
+==========================+=================================================+
| Current Power Limit (W) | 300 |
| Default Power Limit (W) | 300 |
| Max Power Limit (W) | 300 |
| Min Power Limit (W) | 200 |
| Enforced Power Limit (W) | 300 |
+--------------------------+-------------------------------------------------+Use the -v option to display status information for each GPU. For example, run dcgmi discovery -i a -g 0 -v to list the basic device information for each GPU in GPU group 0:
root@be1816e3958c:~# dcgmi discovery -i a -g 0 -v
Device info:
+--------------------------+-------------------------------------------------+
| GPU ID: 0 | Device Information |
+==========================+=================================================+
| Device Name | PPU |
| PCI Bus ID | 00000000:10:00.0 |
| UUID | GPU-019ea108-c110-0828-0000-00002062b161 |
| Serial Number | TH7510H07 |
| InfoROM Version | Not Supported |
| VBIOS | 1.4.44 |
+--------------------------+-------------------------------------------------+
+--------------------------+-------------------------------------------------+
| GPU ID: 1 | Device Information |
+==========================+=================================================+
| Device Name | PPU |
| PCI Bus ID | 00000000:11:00.0 |
| UUID | GPU-019ea108-c120-040c-0000-0000c007e820 |
| Serial Number | TH7510H07 |
| InfoROM Version | Not Supported |
| VBIOS | 1.4.44 |
+--------------------------+-------------------------------------------------+3.1.3 Display MIG instance information
Use the -c option to list existing GPU Instances and Compute Instances. For example, run dcgmi discovery -c to view the MIG instance information for all PPUs. The output shows the hierarchy of MIG instances on the PPU devices:
root@be1816e3958c:/work/setup# dcgmi discovery -c
+-------------------+--------------------------------------------------------------------+
| Instance Hierarchy |
+===================+====================================================================+
| GPU 1 | GPU GPU-019ea108-c120-040c-0000-0000c007e820 (EntityID: 1) |
| -> I 1/0 | GPU Instance (EntityID: 68) |
| -> CI 1/0/0 | Compute Instance (EntityID: 68) |
| -> I 1/1 | GPU Instance (EntityID: 69) |
| -> CI 1/1/0 | Compute Instance (EntityID: 69) |
+-------------------+--------------------------------------------------------------------+3.2 Monitoring device parameters (dmon)
Use the dmon subcommand to monitor device parameters. You can query data for a specified field group from devices in a GPU group. Run dcgmi dmon -h for help information:
root@be1816e3958c:~# dcgmi dmon -h
dmon -- Used to monitor GPUs and their stats.
Usage: dcgmi dmon
dcgmi dmon -i <gpuId> -g <groupId> -f <fieldGroupId> -e <fieldId> -d
<delay> -c <count> -l
Flags:
--host IP/FQDN Connects to specified IP or fully-qualified domain
name. To connect to a host engine that was
started with -d (unix socket), prefix the unix
socket filename with 'unix://'. [default =
localhost]
-f --field-group-id fieldGroupId The field group to query on the specified
host.
-e --field-id fieldId Field identifier to view/inject.
-l --list List to look up the long names, short names and
field ids.
-h --help Displays usage information and exits.
-i --gpu-id gpuId The comma separated list of GPU/GPU-I/GPU-CI IDs
to run the dmon on. Default is -1 which runs for
all supported GPU. Run dcgmi discovery -c to
check list of available GPU entities
-g --group-id groupId The group to query on the specified host.
-d --delay delay In milliseconds. Integer representing how often
to query results from DCGM and print them for all
of the entities. [default = 1000 msec, Minimum
value = 1 msec.]
-c --count count Integer representing How many times to loop
before exiting. [default- runs forever.]
...3.2.1 List of supported parameters
Use the -l option to view the list of supported parameters, including their names and field id information. For example, running dcgmi dmon -l produces the following sample output, which includes the parameter name, its abbreviation, and the corresponding field id:
root@be1816e3958c:~# dcgmi dmon -l
________________________________________________________________________________________________________________________
Long Name Short Name Field ID
________________________________________________________________________________________________________________________
driver_version DRVER 1
nvml_version NVVER 2
process_name PRNAM 3
device_count DVCNT 4
cuda_driver_version CDVER 5
name DVNAM 50
brand DVBRN 51
nvml_index NVIDX 52
serial_number SRNUM 53
uuid UUID# 54
minor_number MNNUM 55
oem_inforom_version OEMVR 56
pci_busid PCBID 57
...3.2.2 Query device parameters
Use the -e option to specify a list of field ids and query their corresponding values. For example, run dcgmi dmon -e 140,150 to query the memory and core temperature of all GPUs:
root@be1816e3958c:~# dcgmi dmon -e 140,150
#Entity MMTMP TMPTR
ID C C
GPU 1 29 29
GPU 0 30 28
GPU 1 30 29
GPU 0 30 27
...Use the -f option to specify a field group to query the values for all field ids within that group. For example, run dcgmi dmon -f 5 to query all parameters in field group 5. To manage field groups, use the dcgmi fieldgroup subcommand:
# Create a field group
root@be1816e3958c:~# dcgmi fieldgroup -c test -f 140,150
Successfully created field group "test" with a field group ID of 5
# Query the field group
root@be1816e3958c:~# dcgmi dmon -f 5
#Entity MMTMP TMPTR
ID C C
GPU 1 30 29
GPU 0 30 28
GPU 1 30 29
GPU 0 30 28
...Note: For information about supported field ids, see Field ID support status.
3.2.3 Other control parameters
By default, dmon periodically prints the monitored device parameters. You can press Ctrl+C to interrupt the query process. You can use the -d option to specify the query period and the -c option to specify the number of queries. For example, dcgmi dmon -e 140,150 -c 1 queries the data only once.
root@be1816e3958c:~# dcgmi dmon -e 140,150 -c 1
#Entity MMTMP TMPTR
ID C C
GPU 1 29 29
GPU 0 30 283.3 Modify device configuration (config)
Use the config subcommand to view and modify device configuration, including parameters such as frequency and ECC mode. Run dcgmi config -h to view the help information:
root@be1816e3958c:~# dcgmi config -h
config -- Used to configure settings for groups of GPUs.
Usage: dcgmi config
dcgmi config --host <IP/FQDN> -g <groupId> --enforce
dcgmi config --host <IP/FQDN> -g <groupId> --get -v -j
dcgmi config --host <IP/FQDN> -g <groupId> --set -e <0/1> -s <0/1> -a
<mem,proc> -P <limit> -c <mode>
Flags:
-g --group groupId The GPU group to query on the specified host.
--host IP/FQDN Connects to specified IP or fully-qualified domain
name. To connect to a host engine that was
started with -d (unix socket), prefix the unix
socket filename with 'unix://'. [default = localhost]
--set Set configuration.
--get Get configuration. Displays the Target and the
Current Configuration.
------
1.Sync Boost - Current and Target Sync Boost State
2.SM Application Clock - Current and Target SM application clock values
3.Memory Application Clock - Current and Target Memory application clock values
4.ECC Mode - Current and Target ECC Mode
5 Power Limit - Current and Target power limits
6.Compute Mode - Current and Target compute mode
--enforce Enforce configuration.
-h --help Displays usage information and exits.
-v --verbose Display policy information per GPU.
-j --json Print the output in a json format
-e --eccmode 0/1 Configure Ecc mode. (1 to Enable, 0 to Disable)
-s --syncboost 0/1 Configure Syncboost. (1 to Enable, 0 to Disable)
-a --appclocks mem,proc Configure Application Clocks. Must use memory,proc clocks (csv) format(MHz).
-P --powerlimit limit Configure Power Limit (Watts).
-c --compmode mode Configure Compute Mode. Can be any of the
following:
0 - Unrestricted
1 - Prohibited
2 - Exclusive Process
...3.3.1 Query device configuration
Use the --get option to query the current and target configuration values. For example, run dcgmi config --get to view a summary of the configuration for all GPUs. In the output:
The
Targetcolumn shows the pending value, which has been set (set) but not yet enforced (enforce).The
Currentcolumn shows the active value, which has been enforced (enforce).
root@be1816e3958c:~# dcgmi config --get
+------------------------------+------------------------------+------------------------------+
| DCGM_ALL_SUPPORTED_GPUS |
| Group of 2 GPUs |
+==============================+==============================+==============================+
| Field | Target | Current |
+------------------------------+------------------------------+------------------------------+
| Compute Mode | Not Specified | Unrestricted |
| ECC Mode | Enabled | Disabled |
| Sync Boost | Not Specified | Not Supported |
| Memory Application Clock | Not Specified | 1800 |
| SM Application Clock | Not Specified | 1200 |
| Power Limit | Not Specified | 300 |
+------------------------------+------------------------------+------------------------------+
...Use the -v option to view the configuration status for each GPU:
root@be1816e3958c:~# dcgmi config --get -v
+------------------------------+------------------------------+------------------------------+
| GPU ID: 0 |
| GPU |
+==============================+==============================+==============================+
| Field | Target | Current |
+------------------------------+------------------------------+------------------------------+
| Compute Mode | Not Specified | Unrestricted |
| ECC Mode | Enabled | Disabled |
| Sync Boost | Not Specified | Not Supported |
| Memory Application Clock | Not Specified | 1800 |
| SM Application Clock | Not Specified | 1200 |
| Power Limit | Not Specified | 300 |
+------------------------------+------------------------------+------------------------------+
+------------------------------+------------------------------+------------------------------+
| GPU ID: 1 |
| GPU |
+==============================+==============================+==============================+
| Field | Target | Current |
+------------------------------+------------------------------+------------------------------+
| Compute Mode | Not Specified | Unrestricted |
| ECC Mode | Enabled | Disabled |
| Sync Boost | Not Specified | Not Supported |
| Memory Application Clock | Not Specified | 1800 |
| SM Application Clock | Not Specified | 1200 |
| Power Limit | Not Specified | 300 |
+------------------------------+------------------------------+------------------------------+3.3.2 Modify device configuration
Use the --set option with other flags to modify the configuration. For example, to enable ECC mode, run dcgmi config --set -e 1:
root@be1816e3958c:~# dcgmi config --set -e 1
Configuration successfully set.DCGM supports the following device configuration options:
Parameter | Description |
-e --eccmode | Modify ECC mode |
-a --appclocks | Modify application clock frequency |
-P --powerlimit | Modify power limit |
-c --compmode | Modify compute mode |
-s --syncboost | Not supported. This option is deprecated. |
The updated configuration status is cached by DCGM. You can use the --enforce option to apply the cached configuration to the corresponding devices. For example, after a device is reset, you can use the --enforce option to reapply the previous configuration by running dcgmi config --enforce:
root@be1816e3958c:~# dcgmi config --enforce
Configuration successfully enforced.3.4 Device diagnostics (diag)
Use the diag subcommand to run a diagnostic on PPU devices. DCGM supports multiple diagnostic levels. Run dcgmi diag -h to view the help information:
root@be1816e3958c:~# dcgmi diag -h
diag -- Used to run diagnostics on the system.
Usage: dcgmi diag
dcgmi diag --host <IP/FQDN> -g <groupId> -r <diag> -p
<test_name.variable_name=variable_value> -c
</full/path/to/config/file> -f <fakeGpuList> -i <gpuList> -v
--statsonfail --debugLogFile <debug file> --statspath <plugin
statistics path> -j --throttle-mask <> --fail-early
--check-interval <failure check interval> --iterations <iterations>
Flags:
...
-r --run diag Run a diagnostic. (Note: higher numbered tests
include all beneath.)
1 - Quick (System Validation ~ seconds)
2 - Medium (Extended System Validation ~ 2 minutes)
3 - Long (System HW Diagnostics ~ 15 minutes)
4 - Extended (Longer-running System HW Diagnostics)
Specific tests to run may be specified by name,
and multiple tests may be specified as a comma
separated list. For example, the command:
dcgmi diag -r "sm stress,diagnostic"
would run the SM Stress and Diagnostic tests together.
-p --parameters test_name.variable_name=variable_value Test parameters to set for this run.
-c --configfile /full/path/to/config/file Path to the configuration file.
-i --gpuList gpuList A comma-separated list of the gpus on which the
diagnostic should run. Cannot be used with -g.
-v --verbose Show information and warnings for each test.
...
--throttle-mask Specify which throttling reasons should be
ignored. You can provide a comma separated list
of reasons. For example, specifying 'HW_SLOWDOWN
,SW_THERMAL' would ignore the HW_SLOWDOWN and
SW_THERMAL throttling reasons. Alternatively, you
can specify the integer value of the ignore
bitmask. For the bitmask, multiple reasons may be
specified by the sum of their bit masks.
...
--fail-early Enable early failure checks for the Targeted Power
, Targeted Stress, SM Stress, and Diagnostic
tests. When enabled, these tests check for a
failure once every 5 seconds (can be modified by
the --check-interval parameter) while the test is
running instead of a single check performed after
the test is complete. Disabled by default.
--check-interval failure check interval Specify the interval (in seconds)
at which the early failure checks should occur
for the Targeted Power, Targeted Stress, SM
Stress, and Diagnostic tests when early failure
checks are enabled. Default is once every 5
seconds. Interval must be between 1 and 300
--iterations iterations Specify a number of iterations of the diagnostic
to run consecutively. (Must be greater than 0.)
...The diag subcommand depends on PPU SDK components. Before using the diag subcommand, ensure that the PPU SDK is correctly installed and that the versions of toolchains, such as GCC, meet the PPU SDK runtime requirements.
3.4.1 Run a diagnostic
Use the -r option to run a diagnostic suite. You can specify one of the following supported suites with the -r option:
Test | Description | Suite 1: Quick | Suite 2: Medium | Suite 3: Long | Suite 4: Extended |
software | Basic environment configuration Feature support | Yes | Yes | Yes | Yes |
pcie | PCIe test ICN link test | Yes | Yes | Yes | |
memory | Memory allocation test Memory read/write test | Yes | Yes | Yes | |
memory_bandwidth | memory bandwidth test | Yes | Yes | Yes | |
diagnostic | Compute capability test | Yes | Yes | ||
sm_stress | SM Stress | Yes | Yes | ||
targeted_stress | Targeted Stress | Yes | Yes | ||
targeted_power | Targeted Power | Yes | Yes | ||
memtest | memory stress test | Yes |
The memory, memory_bandwidth, and memtest diagnostics require ECC to be enabled. To enable ECC on all devices, run the following commands and then reset the PPU devices for the configuration to take effect:
dcgmi config --set -e 1
dcgmi config --enforce
Reset the PPU devices.
For example, run dcgmi diag -r 1 to run diagnostic suite 1:
root@be1816e3958c:/work/deploy# dcgmi diag -r 1
Successfully ran diagnostic for group.
+---------------------------+------------------------------------------------+
| Diagnostic | Result |
+===========================+================================================+
|----- Deployment --------+------------------------------------------------|
| Denylist | Pass |
| NVML Library | Pass |
| CUDA Main Library | Pass |
| Permissions and OS Blocks | Pass |
| Persistence Mode | Skip |
| Environment Variables | Pass |
| Page Retirement/Row Remap | Pass |
| Graphics Processes | N/A |
| Inforom | Skip |
+---------------------------+------------------------------------------------+You can use the -r option to run a specific test program by passing its diagnostic test program name. You can use the -p option to pass parameters to the test program in the format test_name.variable_name=variable_value. For example, to control the runtime duration of sm_stress, run dcgmi diag -r "sm_stress" -p sm_stress.test_duration=5:
root@be1816e3958c:/work/deploy# dcgmi diag -r "sm_stress" -p sm_stress.test_duration=5
Successfully ran diagnostic for group.
+---------------------------+------------------------------------------------+
| Diagnostic | Result |
+===========================+================================================+
|----- Deployment --------+------------------------------------------------|
| Denylist | Pass |
| NVML Library | Pass |
| CUDA Main Library | Pass |
| Permissions and OS Blocks | Pass |
| Persistence Mode | Pass |
| Environment Variables | Pass |
| Page Retirement/Row Remap | Pass |
| Graphics Processes | Pass |
| Inforom | Skip |
+----- Integration -------+------------------------------------------------+
+----- Hardware ----------+------------------------------------------------+
+----- Stress ------------+------------------------------------------------+
| SM Stress | Pass - All |
+---------------------------+------------------------------------------------+The results from the diag subcommand are not intended for RMA purposes. To investigate product quality issues, use tools such as Field Diag and Bug Report.
3.4.2 Other control options
Use the
-goption to run the diagnostic on a specific GPU group, or use the-ioption to specify a GPU index.Use the
--throttle-maskoption to ignore specific reasons that might cause a diagnostic to fail. For example, you can prevent a test from failing due to thermal protection.Use the
--fail-earlyand--check-intervaloptions to enable periodic failure checks. Instead of checking for failures only at the end, the test exits immediately when a failure is detected.
The diag subcommand does not support running diagnostics on a mix of PPU device models. If your system contains multiple PPU device models, use the -i or -g option to select and test devices of the same model.
3.5 View topology (topo)
Use the topo subcommand to view the topology between GPUs. Run dcgmi topo -h to view the help information:
root@be1816e3958c:~# dcgmi topo -h
topo -- Used to find the topology of GPUs on the system.
Usage: dcgmi topo
dcgmi topo --host <IP/FQDN> -g <groupId> -j
dcgmi topo --host <IP/FQDN> --gpuid <gpuId> -j
Flags:
-g --group groupId The group ID to query.
--host IP/FQDN Connects to specified IP or fully-qualified domain
name. To connect to a host engine that was
started with -d (unix socket), prefix the unix
socket filename with 'unix://'. [default = localhost]
-h --help Displays usage information and exits.
--gpuid gpuId The GPU ID to query.
-j --json Print the output in a json format
...3.5.1 View device topology
Use the --gpuid option to view the topology for a specific GPU. To view a summary of a GPU group and its external connections, use the -g option. For example, to view the topology for GPU 0, run dcgmi topo --gpuid 0. The command displays the connections between GPU 0 and other GPUs:
root@be1816e3958c:~# dcgmi topo --gpuid 0
+-------------------+------------------------------------------------------------------------------+
| Topology information |
| GPU ID: 0 |
+===================+==============================================================================+
| CPU core affinity | 0 - 47, 96 - 143 |
| To GPU 1 | Connected via a single PCIe switch |
| | Connected via one NVLINK (Link: 5) |
| To GPU 2 | Connected via a CPU-level link |
| | Connected via one NVLINK (Link: 3) |
| To GPU 3 | Connected via a CPU-level link |
| | Connected via one NVLINK (Link: 2) |
| To GPU 4 | Connected via a CPU-level link |
| To GPU 5 | Connected via a CPU-level link |
| To GPU 6 | Connected via a CPU-level link |
| To GPU 7 | Connected via a CPU-level link |
| | Connected via one NVLINK (Link: 0) |
+-------------------+------------------------------------------------------------------------------+3.6 View ICN link status with NvLink
Use the NvLink subcommand to view the ICN link status. Run dcgmi nvlink -h for help:
root@be1816e3958c:/work/deploy# dcgmi nvlink -h
nvlink -- Used to get NvLink link status or error counts for GPUs and
NvSwitches in the system
NVLINK Error description
=========================
CRC FLIT Error => Data link receive flow control digit CRC error.
CRC Data Error => Data link receive data CRC error.
Replay Error => Data link transmit replay error.
Recovery Error => Data link transmit recovery error.
Usage: dcgmi nvlink
dcgmi nvlink --host <IP/FQDN> -g <gpuId> -e -j
dcgmi nvlink --host <IP/FQDN> -s
Flags:
--host IP/FQDN Connects to specified IP or fully-qualified domain
name. To connect to a host engine that was
started with -d (unix socket), prefix the unix
socket filename with 'unix://'. [default = localhost]
-e --errors Print NvLink errors for a given gpuId (-g).
-s --link-status Print NvLink link status for all GPUs and
NvSwitches in the system.
-h --help Displays usage information and exits.
-g --gpuid gpuId The GPU ID to query. Required for -e
-j --json Print the output in a json format
...The NvLink subcommand does not currently support ICN error queries (-e, --errors).
3.6.1 View link status
To query the ICN link status, use the -s option. In the sample output from the dcgmi nvlink -s command below, U indicates Up and D indicates Down:
root@b5ab3167ed51:~# dcgmi nvlink -s
+----------------------+
| NvLink Link Status |
+----------------------+
GPUs:
gpuId 0:
U D U U U U D _ _ _ _ _ _ _ _ _ _ _
gpuId 1:
U D U U U U D _ _ _ _ _ _ _ _ _ _ _
gpuId 2:
U D U U U U D _ _ _ _ _ _ _ _ _ _ _
gpuId 3:
U D U U U U D _ _ _ _ _ _ _ _ _ _ _
gpuId 4:
U D U U U U D _ _ _ _ _ _ _ _ _ _ _
gpuId 5:
U D U U U U D _ _ _ _ _ _ _ _ _ _ _
gpuId 6:
U D U U U U D _ _ _ _ _ _ _ _ _ _ _
gpuId 7:
U D U U U U D _ _ _ _ _ _ _ _ _ _ _
NvSwitches:
No NvSwitches found.
Key: Up=U, Down=D, Disabled=X, Not Supported=_3.7 Manage device policies
The policy subcommand lets you set and view PPU management policies, such as restarting a device automatically when an ECC error or overheating occurs.
Run dcgmi policy -h to view the help information:
root@be1816e3958c:~# dcgmi policy -h
policy -- Used to control policies for groups of GPUs. Policies control actions
which are triggered by specific events.
Usage: dcgmi policy
dcgmi policy --host <IP/FQDN> -g <groupId> --get -j
dcgmi policy --host <IP/FQDN> -g <groupId> --reg
dcgmi policy --host <IP/FQDN> -g <groupId> --set <actn,val> -M <max> -T
<max> -P <max> -e -p -n -x
Flags:
-g --group groupId The GPU group to query on the specified host.
...
--get Get the current violation policy.
--reg Register this process for policy updates. This
process will sit in an infinite loop waiting for
updates from the policy manager.
--set actn,val Set the current violation policy. Use csv action ,validation (ie. 1,2)
-----
Action to take when any of the violations
specified occur.
0 - None
1 - GPU Reset
-----
Validation to take after the violation action has been performed.
0 - None
1 - System Validation (short)
2 - System Validation (medium)
3 - System Validation (long)
--clear Clear the current violation policy.
-h --help Displays usage information and exits.
-v --verbose Display policy information per GPU.
-M --maxpages max Specify the maximum number of retired pages that
will trigger a violation.
-T --maxtemp max Specify the maximum temperature a group's GPUs can
reach before triggering a violation.
-P --maxpower max Specify the maximum power a group's GPUs can reach
before triggering a violation.
-e --eccerrors Add ECC double bit errors to the policy
conditions.
-p --pcierrors Add PCIe replay errors to the policy conditions.
-n --nvlinkerrors Add NVLink errors to the policy conditions.
-x --xiderrors Add XID errors to the policy conditions.
...3.7.1 View the current policy
The --get option displays the current policy configuration. The following example shows the output for the dcgmi policy --get command:
root@be1816e3958c:~# dcgmi policy --get
Policy information
+-----------------------------+------------------------------------------------+
| Policy Information |
| DCGM_ALL_SUPPORTED_GPUS |
+=============================+================================================+
| Violation conditions | Double-bit ECC errors |
| | PCI errors and replays |
| | Max temperature threshold - 90 |
| Isolation mode | Manual |
| Action on violation | None |
| Validation after action | System Validation (Long) |
| Validation failure action | None |
+-----------------------------+------------------------------------------------+Violation conditions: Conditions that trigger the policy, such as an ECC error, a PCIe error, or exceeding a temperature threshold.
Action on violation: The action performed when the policy is violated, such as restarting the PPU device.
Validation after action: The validation to perform after the action completes.
3.7.2 Set and enforce a policy
To set and enforce a policy, complete the following two steps:
Use the
--setoption along with options like-Mand-Tto set policy conditions, such as a temperature threshold.Use the
--regoption to register the currentdcgmiprocess, which then begins polling for policy violations.
You can use the --set option to specify the action to take when a policy is violated (such as restarting the PPU) and the time until the next check after the action is executed. The --set option must be used with other check condition options. The supported check conditions are as follows:
Parameter | Description |
-M --maxpages | The number of retired pages reaches the specified maximum. |
-T --maxtemp | The device temperature exceeds the configured limit. |
-P --maxpower | The device power consumption exceeds the configured limit. |
-e --eccerrors | A double-bit ECC error occurs. |
-p --pcierrors | A PCIe replay error occurs. (Not supported) |
-x --xiderrors | A driver error (XID error) occurs. |
For example, run dcgmi policy --set 0,3 -T 90 -p -e to set a policy for temperature, PCIe errors, and ECC errors. Then, run dcgmi policy --reg to enforce the policy and start monitoring. When a violation occurs, the process takes the configured action, such as resetting the corresponding device:
root@be1816e3958c:~# dcgmi policy --set 0,3 -T 90 -p -e
Policy successfully set.
root@be1816e3958c:~# dcgmi policy --reg
Listening for violations.
...3.8 Device health (health)
Use the health subcommand to monitor device health, for example, by checking for ECC errors or if temperature and power consumption have exceeded configured thresholds.
Run dcgmi health -h for help:
root@be1816e3958c:~# dcgmi health -h
health -- Used to manage the health watches of a group. The health of the GPUs
in a group can then be monitored during a process.
Usage: dcgmi health
dcgmi health --host <IP/FQDN> -g <groupId> -c -j
dcgmi health --host <IP/FQDN> -g <groupId> -f -j
dcgmi health --host <IP/FQDN> -g <groupId> -s <flags> -j -m <seconds> -u <seconds>
Flags:
-g --group groupId The GPU group to query on the specified host.
...
-f --fetch Fetch the current watch status.
-s --set flags Set the watches to be monitored. [default = pm]
a - all watches
p - PCIe watches (*)
m - memory watches (*)
i - infoROM watches
t - thermal and power watches (*)
n - NVLink watches (*)
(*) watch requires 60 sec before first query
--clear Disable all watches being monitored.
-c --check Check to see if any errors or warnings have
occurred in the currently monitored watches.
...
-m --max-keep-age seconds How long DCGM should cache the samples in seconds.
-u --update-interval seconds How often DCGM should retrieve health from the driver in seconds.
...3.8.1 Enabled watches
Use the -f option to view which watches are currently enabled. For example, running dcgmi health -f shows that watches for components like memory and PCIe are active.
root@be1816e3958c:~# dcgmi health -f
Health monitor systems report
+-----------------+--------------------------------------------------------------------+
| PCIe | On |
| NVLINK | On |
| Memory | On |
| SM | Off |
| InfoROM | On |
| Thermal | On |
| Power | On |
| Driver | Off |
| NvSwitch NF | Off |
| NvSwitch F | Off |
+-----------------+--------------------------------------------------------------------+3.8.2 Set watches
Use the -s option to set which watches to monitor, and the --clear option to disable all watches.
For subscribed watches, use -m to set how long to cache data and -u to set how often to query the device status. For example, run dcgmi health -s a -m 30 -u 1 to subscribe to all watches, cache data for 30 seconds, and query the device status once per second:
root@be1816e3958c:~# dcgmi health -s a -m 30 -u 1
Health monitor systems set successfully.3.8.3 Monitoring errors
Use the -c option to check subscribed watches for errors. For example, run dcgmi health -c:
root@be1816e3958c:~# dcgmi health -c
+---------------------------+----------------------------------------------------------+
| Health Monitor Report |
+===========================+==========================================================+
| Overall Health | Failure |
| GPU | |
| -> 0 | Failure |
| -> Errors | |
| -> NVLINK system | Failure |
| | GPU 0's NvLink link 0 is currently down Run a field |
| | diagnostic on the GPU. |
...3.9 Manage groups
Use the group subcommand to manage groups of devices. For example, you can add multiple PPU devices to a group and then specify this group in other dcgmi subcommands using the -g option. PPU DCGM supports multiple group levels, such as PPU-level groups, ICN link-level groups, and compute instance-level groups.
PPU DCGM defines a default device group (group ID 0) containing all supported PPU devices. If you omit the -g option in other dcgmi subcommands, the command runs on group 0 by default.
To view help information, run dcgmi group -h:
root@be1816e3958c:~# dcgmi group -h
group -- Used to create and maintain groups of GPUs. Groups of GPUs can then be
uniformly controlled through other DCGMI subsystems.
Usage: dcgmi group
dcgmi group --host <IP/FQDN> -l -j
dcgmi group --host <IP/FQDN> -c <groupName> --default --defaultnvswitches
dcgmi group --host <IP/FQDN> -c <groupName> -a <entityId>
dcgmi group --host <IP/FQDN> -d <groupId>
dcgmi group --host <IP/FQDN> -g <groupId> -i -j
dcgmi group --host <IP/FQDN> -g <groupId> -a <entityId>
dcgmi group --host <IP/FQDN> -g <groupId> -r <entityId>
Flags:
...
-l --list List the groups that currently exist for a host.
-d --delete groupId Delete a group on the remote host.
-c --create groupName Create a group on the remote host.
-h --help Displays usage information and exits.
-i --info Display the information for the specified group ID.
-r --remove entityId Remove device(s) from group. (csv gpuIds, or
entityIds like gpu:0,nvswitch:994)
-a --add entityId Add device(s) to group. (csv gpuIds or entityIds
simlar to gpu:0, instance:1, compute_instance:2,
nvswitch:994)
--default Adds all available GPUs to the group being created.
--defaultnvswitches Adds all available NvSwitches to the group being created.3.9.1 List groups
You can view existing groups by using the -l option. For example, run dcgmi group -l. The output is as follows:
root@be1816e3958c:~# dcgmi group -l
+-------------------+----------------------------------------------------------+
| GROUPS |
| 2 groups found. |
+===================+==========================================================+
| Groups | |
| -> 0 | |
| -> Group ID | 0 |
| -> Group Name | DCGM_ALL_SUPPORTED_GPUS |
| -> Entities | GPU 0, GPU 1 |
| -> 1 | |
| -> Group ID | 1 |
| -> Group Name | DCGM_ALL_SUPPORTED_NVSWITCHES |
| -> Entities | None |
+-------------------+----------------------------------------------------------+Use the -i option to view the details of a group, specifying the group ID with the -g option. For example, run dcgmi group -g 0 -i:
root@be1816e3958c:~# dcgmi group -g 0 -i
+-------------------+----------------------------------------------------------+
| GROUP INFO |
+===================+==========================================================+
| 0 | |
| -> Group ID | 0 |
| -> Group Name | DCGM_ALL_SUPPORTED_GPUS |
| -> Entities | GPU 0, GPU 1 |
+-------------------+----------------------------------------------------------+3.9.2 Manage groups
Use the -c option to create a group and the -a option to add devices to it. For example, run dcgmi group -c test -a gpu:0,1 to create a group named test and add PPU 0 and PPU 1 to it. You can use the --default option to add all available PPUs or the --defaultnvswitches option to add all available NvSwitches to the group.
root@be1816e3958c:~# dcgmi group -c test -a gpu:0,1
Successfully created group "test" with a group ID of 2
Add to group operation successful.Use the -r option to remove a device from a group. For example, run dcgmi group -g 2 -r 1 to remove PPU 1 from group 2.
root@be1816e3958c:~# dcgmi group -g 2 -r 1
Remove from group operation successful.To delete a group, use the -d option. For example, to delete group 2, run dcgmi group -d 2:
root@be1816e3958c:~# dcgmi group -d 2
Successfully removed group 23.10 Manage field groups (fieldgroup)
Use the fieldgroup subcommand to manage groups of field IDs. You can then specify a field group to query all its fields at once, for example, by using the -f option with the dmon subcommand.
Run dcgmi fieldgroup -h to view the help message:
root@be1816e3958c:~# dcgmi fieldgroup -h
fieldgroup -- Used to create and maintain groups of field IDs. Groups of field
IDs can then be uniformly controlled through other DCGMI subsystems.
Usage: dcgmi fieldgroup
dcgmi fieldgroup --host <IP/FQDN> -l -j
dcgmi fieldgroup --host <IP/FQDN> -c <fieldGroupName> -f <fieldIds>
dcgmi fieldgroup --host <IP/FQDN> -i -g <fieldGroupId> -j
dcgmi fieldgroup --host <IP/FQDN> -d -g <fieldGroupId>
Flags:
...
-l --list List the field groups that currently exist for a host.
-i --info Display the information for the specified field group ID.
-d --delete Delete a field group on the remote host.
-c --create fieldGroupName Create a field group on the remote host.
-h --help Displays usage information and exits.
-g --fieldgroup fieldGroupId The field group to query on the specified host.
-f --fieldids fieldIds Comma-separated list of the field ids to add to a
field group when creating a new one.
...3.10.1 View field groups
Use the -l option to list existing field groups. For example, run dcgmi fieldgroup -l:
root@be1816e3958c:~# dcgmi fieldgroup -l
3 field groups found.
+-------------------+----------------------------------------------------------+
| FIELD GROUPS |
+===================+==========================================================+
| ID | 1 |
| Name | DCGM_INTERNAL_30SEC |
| Field IDs | 300 |
+-------------------+----------------------------------------------------------+
+-------------------+----------------------------------------------------------+
| FIELD GROUPS |
+===================+==========================================================+
| ID | 2 |
| Name | DCGM_INTERNAL_HOURLY |
| Field IDs | 501, 509, 510, 511, 512, 513 |
+-------------------+----------------------------------------------------------+
...Use the -i option with the -g option to view the details of a specific field group. For example, run dcgmi fieldgroup -g 2 -i:
root@be1816e3958c:~# dcgmi fieldgroup -g 2 -i
+-------------------+----------------------------------------------------------+
| FIELD GROUPS |
+===================+==========================================================+
| ID | 2 |
| Name | DCGM_INTERNAL_HOURLY |
| Field IDs | 501, 509, 510, 511, 512, 513 |
+-------------------+----------------------------------------------------------+3.10.2 Manage field groups
Use the -c option to create a field group and the -f option to specify the field IDs to include. For example, run dcgmi fieldgroup -c temperature -f 140,150 to create a group named temperature that includes the GPU temperature and memory temperature fields:
root@be1816e3958c:~# dcgmi fieldgroup -c temperature -f 140,150
Successfully created field group "temperature" with a field group ID of 4Use the -d option with the -g option to delete a field group. For example, run dcgmi fieldgroup -d -g 4:
root@be1816e3958c:~# dcgmi fieldgroup -d -g 4
Successfully removed field group 43.11 Manage profiling metrics (profile)
Use the profile subcommand to view and manage profiling metrics. Run dcgmi profile -h for help:
root@457471bb3c5e:~# dcgmi profile -h
profile -- View available profiling metrics for GPUs
Usage: dcgmi profile
Flags:
--host IP/FQDN Connects to specified IP or fully-qualified domain
name. To connect to a host engine that was
started with -d (unix socket), prefix the unix
socket filename with 'unix://'. [default =
localhost]
-l --list List available profiling metrics for a GPU or
group of GPUs
--pause Pause DCGM profiling in order to run NVIDIA
developer tools like nvprof, nsight compute, or
nsight systems.
--resume Resume DCGM profiling that was paused previously
with --pause.
-h --help Displays usage information and exits.
-j --json Print the output in a json format
-i --gpu-id gpuId The comma seperated list of GPU IDs to query.
Default is supported GPUs on the system. Run
dcgmi discovery -l to check list of GPUs
available
-g --group-id groupId The group of GPUs to query on the specified host.
...3.11.1 List available profiling metrics
Use the dcgmi profile -l option to list available profiling metrics. You can query specific GPU devices by using the -i or -g option. For example:
root@457471bb3c5e:~# dcgmi profile -l
+----------------+----------+------------------------------------------------------+
| Group.Subgroup | Field ID | Field Tag |
+----------------+----------+------------------------------------------------------+
| A.0 | 1002 | sm_active |
| A.0 | 1003 | sm_occupancy |
...To query these profiling metrics, pass their Field ID values to the dcgmi dmon -e command. For example:
dcgmi dmon -e 1002,10033.11.2 Pause and resume profiling
Subscribing to profiling metrics (Field ID > 1000) consumes GPU profiling resources and prevents other tools with a built-in DCGM server (such as dcgm-exporter) and Asight from running. Use dcgmi profile --pause to pause profiling before running other tools. Afterwards, use dcgmi profile --resume to resume profiling. While profiling is paused, these metrics are reported as N/A. For example:
# Pause profiling
dcgmi profile --pause
# Collect trace data with acu
acu -o test_report -f python test_linear.py
# Resume profiling
dcgmi profile --resume4. DCGM API support
PPU DCGM provides the DCGM shared library libdcgm.so, which is used to develop the command-line tool dcgmi, the background service nv-hostengine, and hgdcgm-exporter. For a description of the interfaces provided by libdcgm.so, see the API documentation in dcgm_agent.h.
The DCGM APIs supported in libdcgm.so are as follows:
API | Description | Supported |
dcgmInit | Initializes DCGM within this process. | Yes |
dcgmStartEmbedded | Starts an embedded host engine agent within this process. | Yes |
dcgmProfGetSupportedMetricGroups | Gets all profiling metric groups for a given GPU group. | Yes |
dcgmGroupCreate | Creates an entity group handle to store one or more entity IDs and returns the opaque handle in | Yes |
dcgmFieldGroupCreate | Creates a group of fields and returns the handle in | Yes |
dcgmWatchFields | Requests that DCGM start recording updates for a specified field collection. | Yes |
dcgmUpdateAllFields | Tells DCGM to update all watched fields. | Yes |
dcgmEntityGetLatestValues | Requests the latest cached values of specified fields for a specific entity. | Yes |
dcgmFieldGroupDestroy | Removes a field group that was created with | Yes |
DcgmFieldsTerm | Terminates the DcgmFields module. Call this once from inside your program. | Yes |
dcgmGetGpuInstanceHierarchy | Gets the hierarchy of GPUs, GPU Instances, and Compute Instances. It populates a list for each entity, including a reference to its parent. | Yes |
dcgmGroupAddDevice | Adds a specified GPU ID to the group identified by | Yes |
dcgmGetAllSupportedDevices | Gets identifiers for all DCGM-supported devices on the system. | Yes |
dcgmGetAllDevices | Gets identifiers for all devices on the system. | Yes |
dcgmGetDeviceTopology | Gets the device topology for the specified | Yes |
dcgmGetDeviceAttributes | Gets device attributes for the specified | Yes |
dcgmHealthSet | Enables the DCGM health check for specified systems defined in | Yes |
dcgmHealthCheck | Checks the configured watches for any errors, failures, or warnings that have occurred since the last check. | Yes |
5. Field ID support
PPU supports the following DCGM field IDs:
Field name | Field ID | Description | Supported |
DCGM_FI_DRIVER_VERSION | 1 | Driver version. | Yes |
DCGM_FI_NVML_VERSION | 2 | The underlying NVML version. | Yes |
DCGM_FI_PROCESS_NAME | 3 | Process name. | Yes |
DCGM_FI_DEV_COUNT | 4 | Number of devices on the node. | Yes |
DCGM_FI_CUDA_DRIVER_VERSION | 5 | CUDA driver version. | Yes |
DCGM_FI_DEV_NAME | 50 | GPU device name. | Yes |
DCGM_FI_DEV_NVML_INDEX | 52 | The NVML index of the device. | Yes |
DCGM_FI_DEV_SERIAL | 53 | Device serial number. | Yes |
DCGM_FI_DEV_UUID | 54 | The device's UUID. | Yes |
DCGM_FI_GPU_TOPOLOGY_PCI | 60 | The static PCIe topology of all GPUs on the system. | Yes |
DCGM_FI_DEV_MIG_MODE | 67 | The MIG mode of the device. | Yes |
DCGM_FI_DEV_VBIOS_VERSION | 85 | The VBIOS version of the device. | Yes |
DCGM_FI_DEV_SM_CLOCK | 100 | SM clock frequency (in MHz). | Yes |
DCGM_FI_DEV_MEM_CLOCK | 101 | Memory clock frequency (in MHz). | Yes |
DCGM_FI_DEV_VIDEO_CLOCK | 102 | The device's video encoder/decoder clock. | Yes |
DCGM_FI_DEV_APP_SM_CLOCK | 110 | SM application clock frequency. | Yes |
DCGM_FI_DEV_APP_MEM_CLOCK | 111 | Memory application clock frequency. | Yes |
DCGM_FI_DEV_CLOCK_THROTTLE_REASONS | 112 | The current clock throttle reasons. | Yes |
DCGM_FI_DEV_MAX_SM_CLOCK | 113 | The device's maximum supported SM clock. | Yes |
DCGM_FI_DEV_MAX_MEM_CLOCK | 114 | The device's maximum supported memory clock. | Yes |
DCGM_FI_DEV_MAX_VIDEO_CLOCK | 115 | The device's maximum supported video encoder/decoder clock. | Yes |
DCGM_FI_DEV_MEMORY_TEMP | 140 | Memory temperature (in C). | Yes |
DCGM_FI_DEV_GPU_TEMP | 150 | GPU temperature (in C). | Yes |
DCGM_FI_DEV_MEM_MAX_OP_TEMP | 151 | The maximum operating temperature of the device's memory. | Yes |
DCGM_FI_DEV_GPU_MAX_OP_TEMP | 152 | The maximum operating temperature of the device. | Yes |
DCGM_FI_DEV_POWER_USAGE | 155 | Power usage (in W). | Yes |
DCGM_FI_DEV_TOTAL_ENERGY_CONSUMPTION | 156 | Total energy consumption since boot (in mJ). | No |
DCGM_FI_DEV_SLOWDOWN_TEMP | 158 | The device's slowdown temperature. | Yes |
DCGM_FI_DEV_SHUTDOWN_TEMP | 159 | The device's shutdown temperature. | Yes |
DCGM_FI_DEV_POWER_MGMT_LIMIT | 160 | The device's current power limit. | Yes |
DCGM_FI_DEV_POWER_MGMT_LIMIT_MIN | 161 | The device's minimum power limit. | Yes |
DCGM_FI_DEV_POWER_MGMT_LIMIT_MAX | 162 | The device's maximum power limit. | Yes |
DCGM_FI_DEV_POWER_MGMT_LIMIT_DEF | 163 | The device's default power limit. | Yes |
DCGM_FI_DEV_ENFORCED_POWER_LIMIT | 164 | The effective power limit enforced by the driver, which considers all limiters. | Yes |
DCGM_FI_DEV_PCIE_TX_THROUGHPUT | 200 | Total bytes transmitted through PCIe TX (in KB), as reported by NVML. | Yes |
DCGM_FI_DEV_PCIE_RX_THROUGHPUT | 201 | Total bytes received through PCIe RX (in KB), as reported by NVML. | Yes |
DCGM_FI_DEV_PCIE_REPLAY_COUNTER | 202 | PCIe replay counter. | No |
DCGM_FI_DEV_GPU_UTIL | 203 | GPU utilization (in %). | Yes |
DCGM_FI_DEV_MEM_COPY_UTIL | 204 | Memory copy utilization (in %). | Yes |
DCGM_FI_DEV_ENC_UTIL | 206 | Encoder utilization (in %). | Yes |
DCGM_FI_DEV_DEC_UTIL | 207 | Decoder utilization (in %). | Yes |
DCGM_FI_DEV_PCIE_MAX_LINK_GEN | 235 | Maximum PCIe link generation. | Yes |
DCGM_FI_DEV_PCIE_MAX_LINK_WIDTH | 236 | Maximum PCIe link width. | Yes |
DCGM_FI_DEV_PCIE_LINK_GEN | 237 | Current PCIe link generation. | Yes |
DCGM_FI_DEV_PCIE_LINK_WIDTH | 238 | Current PCIe link width. | Yes |
DCGM_FI_DEV_FB_TOTAL | 250 | Total frame buffer of the device (in MB). | Yes |
DCGM_FI_DEV_FB_FREE | 251 | Free frame buffer memory (in MB). | Yes |
DCGM_FI_DEV_FB_USED | 252 | Used frame buffer memory (in MB). | Yes |
DCGM_FI_DEV_ECC_CURRENT | 300 | The current ECC mode of the device. | Yes |
DCGM_FI_DEV_ECC_PENDING | 301 | The pending ECC mode of the device. | Yes |
DCGM_FI_DEV_ECC_SBE_VOL_TOTAL | 310 | Total single-bit volatile ECC errors. | Yes |
DCGM_FI_DEV_ECC_DBE_VOL_TOTAL | 311 | Total double-bit volatile ECC errors. | Yes |
DCGM_FI_DEV_ECC_SBE_AGG_TOTAL | 312 | Total single-bit persistent ECC errors. | Yes |
DCGM_FI_DEV_ECC_DBE_AGG_TOTAL | 313 | Total double-bit persistent ECC errors. | Yes |
DCGM_FI_DEV_ECC_SBE_VOL_DEV | 318 | Count of single-bit volatile ECC errors in device memory. | Yes |
DCGM_FI_DEV_ECC_DBE_VOL_DEV | 319 | Count of double-bit volatile ECC errors in device memory. | Yes |
DCGM_FI_DEV_ECC_SBE_AGG_DEV | 328 | Count of single-bit aggregate (persistent) ECC errors in device memory. | Yes |
DCGM_FI_DEV_ECC_DBE_AGG_DEV | 329 | Count of double-bit aggregate (persistent) ECC errors in device memory. | Yes |
DCGM_FI_DEV_RETIRED_SBE | 390 | Total retired pages due to single-bit errors. | Yes |
DCGM_FI_DEV_RETIRED_DBE | 391 | Total retired pages due to double-bit errors. | Yes |
DCGM_FI_DEV_RETIRED_PENDING | 392 | Total pages pending retirement. | Yes |
DCGM_FI_DEV_UNCORRECTABLE_REMAPPED_ROWS | 393 | Count of remapped rows for uncorrectable errors. | Yes |
DCGM_FI_DEV_CORRECTABLE_REMAPPED_ROWS | 394 | Count of remapped rows for correctable errors. | Yes |
DCGM_FI_DEV_ROW_REMAP_FAILURE | 395 | Indicates if row remapping has failed. | Yes |
DCGM_FI_DEV_ROW_REMAP_PENDING | 396 | Indicates if row remapping is pending. | Yes |
DCGM_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_TOTAL | 409 | Total NVLink flow-control CRC errors. | No |
DCGM_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_TOTAL | 419 | Total NVLink data CRC errors. | No |
DCGM_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_TOTAL | 429 | Total NVLink retries. | No |
DCGM_FI_DEV_NVLINK_BANDWIDTH_L0 | 440 | Bandwidth counter for ICN link lane 0. | Yes |
DCGM_FI_DEV_NVLINK_BANDWIDTH_L1 | 441 | Bandwidth counter for ICN link lane 1. | Yes |
DCGM_FI_DEV_NVLINK_BANDWIDTH_L2 | 442 | Bandwidth counter for ICN link lane 2. | Yes |
DCGM_FI_DEV_NVLINK_BANDWIDTH_L3 | 443 | Bandwidth counter for ICN link lane 3. | Yes |
DCGM_FI_DEV_NVLINK_BANDWIDTH_L4 | 444 | Bandwidth counter for ICN link lane 4. | Yes |
DCGM_FI_DEV_NVLINK_BANDWIDTH_L5 | 445 | Bandwidth counter for ICN link lane 5. | Yes |
DCGM_FI_DEV_NVLINK_BANDWIDTH_TOTAL | 449 | Total ICN link bandwidth counter across all lanes. | Yes |
DCGM_FI_DEV_NVLINK_BANDWIDTH_L6 | 475 | Bandwidth counter for ICN link lane 6. | Yes |
DCGM_FI_PROF_GR_ENGINE_ACTIVE | 1001 | The ratio of time that the graphics engine is active. | No |
DCGM_FI_PROF_SM_ACTIVE | 1002 | Percentage of cycles an SM has at least one warp assigned. | Yes |
DCGM_FI_PROF_SM_OCCUPANCY | 1003 | Percentage of warps resident on an SM. | Yes |
DCGM_FI_PROF_PIPE_TENSOR_ACTIVE | 1004 | Percentage of cycles the tensor (HMMA) pipe is active. | Yes |
DCGM_FI_PROF_DRAM_ACTIVE | 1005 | Percentage of cycles the device memory interface is active sending or receiving data. | Yes |
DCGM_FI_PROF_PIPE_FP64_ACTIVE | 1006 | Percentage of cycles the FP64 pipes are active. | No |
DCGM_FI_PROF_PIPE_FP32_ACTIVE | 1007 | Percentage of cycles the FP32 pipes are active. | No |
DCGM_FI_PROF_PIPE_FP16_ACTIVE | 1008 | Percentage of cycles the FP16 pipes are active. | No |
DCGM_FI_PROF_PCIE_TX_BYTES | 1009 | Total bytes of active PCIe transmit (TX) data, including both header and payload. | Yes |
DCGM_FI_PROF_PCIE_RX_BYTES | 1010 | Total bytes of active PCIe receive (RX) data, including both header and payload. | Yes |
DCGM_FI_PROF_NVLINK_TX_BYTES | 1011 | Total bytes of active NVLink transmit (TX) data, including both header and payload. | Yes |
DCGM_FI_PROF_NVLINK_RX_BYTES | 1012 | Total bytes of active NVLink receive (RX) data, including both header and payload. | Yes |
DCGM_FI_PROF_NVLINK_L0_TX_BYTES | 1040 | Total transmitted bytes over NVLink ICN link 0. | Yes |
DCGM_FI_PROF_NVLINK_L0_RX_BYTES | 1041 | Total received bytes over NVLink ICN link 0. | Yes |
DCGM_FI_PROF_NVLINK_L1_TX_BYTES | 1042 | Total transmitted bytes over NVLink ICN link 1. | Yes |
DCGM_FI_PROF_NVLINK_L1_RX_BYTES | 1043 | Total received bytes over NVLink ICN link 1. | Yes |
DCGM_FI_PROF_NVLINK_L2_TX_BYTES | 1044 | Total transmitted bytes over NVLink ICN link 2. | Yes |
DCGM_FI_PROF_NVLINK_L2_RX_BYTES | 1045 | Total received bytes over NVLink ICN link 2. | Yes |
DCGM_FI_PROF_NVLINK_L3_TX_BYTES | 1046 | Total transmitted bytes over NVLink ICN link 3. | Yes |
DCGM_FI_PROF_NVLINK_L3_RX_BYTES | 1047 | Total received bytes over NVLink ICN link 3. | Yes |
DCGM_FI_PROF_NVLINK_L4_TX_BYTES | 1048 | Total transmitted bytes over NVLink ICN link 4. | Yes |
DCGM_FI_PROF_NVLINK_L4_RX_BYTES | 1049 | Total received bytes over NVLink ICN link 4. | Yes |
DCGM_FI_PROF_NVLINK_L5_TX_BYTES | 1050 | Total transmitted bytes over NVLink ICN link 5. | Yes |
DCGM_FI_PROF_NVLINK_L5_RX_BYTES | 1051 | Total received bytes over NVLink ICN link 5. | Yes |
DCGM_FI_PROF_NVLINK_L6_TX_BYTES | 1052 | Total transmitted bytes over NVLink ICN link 6. | Yes |
DCGM_FI_PROF_NVLINK_L6_RX_BYTES | 1053 | Total received bytes over NVLink ICN link 6. | Yes |
DCGM_FI_PROF_KSD_HIT_RATE | 6001 | The KSD hit rate. | Yes |
DCGM_FI_PROF_KVD_HIT_RATE | 6002 | The KVD hit rate. | Yes |
DCGM_FI_PROF_L2_HIT_RATE | 6003 | The L2 cache hit rate. | Yes |
DCGM_FI_PROF_LLC_HIT_RATE | 6004 | The LLC cache hit rate. | No |
6. The dcgm-exporter tool
PPU DCGM provides the dcgm-exporter tool, which simplifies integration with a k8s environment for querying and managing PPU devices.
6.1 Procedure
As described in Get and install, after you extract the PPU DCGM installation package, you will find the dcgm-exporter directory. This directory contains the dcgm-exporter executable file and default-counters.csv. You can modify default-counters.csv to control which metrics are exposed. The following example shows the file's content:
# Format
# Lines starting with a '#' are considered comments
# DCGM FIELD, Prometheus metric type, help message
# Clocks
DCGM_FI_DEV_SM_CLOCK, gauge, SM clock frequency (in MHz).
DCGM_FI_DEV_MEM_CLOCK, gauge, Memory clock frequency (in MHz).
# Temperature
DCGM_FI_DEV_MEMORY_TEMP, gauge, Memory temperature (in C).
DCGM_FI_DEV_GPU_TEMP, gauge, GPU temperature (in C).
# Power
DCGM_FI_DEV_POWER_USAGE, gauge, Power draw (in W).
# PCIE
DCGM_FI_DEV_PCIE_TX_THROUGHPUT, counter, Total number of bytes transmitted through PCIe TX (in KB) via NVML.
DCGM_FI_DEV_PCIE_RX_THROUGHPUT, counter, Total number of bytes received through PCIe RX (in KB) via NVML.
# Utilization (the sample period varies depending on the product)
DCGM_FI_DEV_GPU_UTIL, gauge, GPU utilization (in %).
DCGM_FI_DEV_ENC_UTIL, gauge, Encoder utilization (in %).
DCGM_FI_DEV_DEC_UTIL , gauge, Decoder utilization (in %).
# Memory usage
DCGM_FI_DEV_FB_FREE, gauge, Framebuffer memory free (in MiB).
DCGM_FI_DEV_FB_USED, gauge, Framebuffer memory used (in MiB).
DCGM_FI_DEV_FB_TOTAL, gauge, Framebuffer memory total (in MiB)
...To start dcgm-exporter, run ./dcgm-exporter. The tool exposes metrics on an HTTP endpoint, which is port 9400 by default. The following example shows how to start the exporter and retrieve metrics:
# Start the dcgm-exporter service
./dcgm-exporter &
# Retrieve the metrics
curl localhost:9400/metricsThe following is an example of the output:
# HELP DCGM_FI_DEV_SM_CLOCK SM clock frequency (in MHz).
# TYPE DCGM_FI_DEV_SM_CLOCK gauge
DCGM_FI_DEV_SM_CLOCK{gpu="0",UUID="GPU-019ea108-c170-021e-0000-00002069567c",device="ppu0",modelName="PPU",Hostname="ubuntu",DCGM_FI_DRIVER_VERSION="0.8.0"} 1500
# HELP DCGM_FI_DEV_MEM_CLOCK Memory clock frequency (in MHz).
# TYPE DCGM_FI_DEV_MEM_CLOCK gauge
DCGM_FI_DEV_MEM_CLOCK{gpu="0",UUID="GPU-019ea108-c170-021e-0000-00002069567c",device="ppu0",modelName="PPU",Hostname="ubuntu",DCGM_FI_DRIVER_VERSION="0.8.0"} 1800
# HELP DCGM_FI_DEV_MEMORY_TEMP Memory temperature (in C).
# TYPE DCGM_FI_DEV_MEMORY_TEMP gauge
DCGM_FI_DEV_MEMORY_TEMP{gpu="0",UUID="GPU-019ea108-c170-021e-0000-00002069567c",device="ppu0",modelName="PPU",Hostname="ubuntu",DCGM_FI_DRIVER_VERSION="0.8.0"} 36
# HELP DCGM_FI_DEV_GPU_TEMP GPU temperature (in C).
# TYPE DCGM_FI_DEV_GPU_TEMP gauge
DCGM_FI_DEV_GPU_TEMP{gpu="0",UUID="GPU-019ea108-c170-021e-0000-00002069567c",device="ppu0",modelName="PPU",Hostname="ubuntu",DCGM_FI_DRIVER_VERSION="0.8.0"} 38
# HELP DCGM_FI_DEV_POWER_USAGE Power draw (in W).
# TYPE DCGM_FI_DEV_POWER_USAGE gauge
DCGM_FI_DEV_POWER_USAGE{gpu="0",UUID="GPU-019ea108-c170-021e-0000-00002069567c",device="ppu0",modelName="PPU",Hostname="ubuntu",DCGM_FI_DRIVER_VERSION="0.8.0"} 130.730000
# HELP DCGM_FI_DEV_PCIE_TX_THROUGHPUT Total number of bytes transmitted through PCIe TX (in KB) via NVML.
# TYPE DCGM_FI_DEV_PCIE_TX_THROUGHPUT counter
DCGM_FI_DEV_PCIE_TX_THROUGHPUT{gpu="0",UUID="GPU-019ea108-c170-021e-0000-00002069567c",device="ppu0",modelName="PPU",Hostname="ubuntu",DCGM_FI_DRIVER_VERSION="0.8.0"} 0.000000
# HELP DCGM_FI_DEV_PCIE_RX_THROUGHPUT Total number of bytes received through PCIe RX (in KB) via NVML.
# TYPE DCGM_FI_DEV_PCIE_RX_THROUGHPUT counter
DCGM_FI_DEV_PCIE_RX_THROUGHPUT{gpu="0",UUID="GPU-019ea108-c170-021e-0000-00002069567c",device="ppu0",modelName="PPU",Hostname="ubuntu",DCGM_FI_DRIVER_VERSION="0.8.0"} 0.000000
... 6.2 Use with the dcgmi CLI
Running the dcgmi command-line tool and dcgm-exporter on the same system can cause conflicts. By default, dcgm-exporter uses an embedded DCGM server. This creates multiple subscribers for PPU monitoring data, which increases performance overhead and can cause failures when you subscribe to performance analysis fields (Field ID > 1000).
To prevent these conflicts, use the dcgm-exporter parameter -r to specify the port address of the nv-hostengine background service. With this parameter, dcgm-exporter retrieves monitoring data through nv-hostengine instead of its embedded server. For example:
./dcgm-exporter -r localhost:55557. FAQ
7.1 Use DCGM tools in Docker
When you start a container with docker run, omit the --gpus option. To allow a container to access PPU devices on the host machine, you can either create a privileged container with the --privileged parameter or map specific PPU devices to an unprivileged container with the --device parameter.
To start an image with access to all cards, use the following command (--privileged):
docker run --privileged --ipc=host --shm-size=4g --ulimit memlock=-1 --ulimit stack=67108864 --init -it -v $HOME:/mnt -w /workspace --name test_$USER <DOCKER_NAME> /bin/bashTo start an image with a specific PPU device, use a command like the following. This example uses the --device=/dev/alixpu_ppu0 --device=/dev/alixpu --device=/dev/alixpu_ctl flags to grant access to only the PPU 0 device:
docker run --device=/dev/alixpu_ppu0 --device=/dev/alixpu --device=/dev/alixpu_ctl --ipc=host --shm-size=4g --ulimit memlock=-1 --ulimit stack=67108864 --init -it -v $HOME:/mnt -w /workspace --name tf_$USER <DOCKER_NAME> /bin/bashKnown issues
SDK v1.0.0: DCGM is not supported on systems where vGPU is enabled.
SDK v1.0.0: The reported application clock frequency may be lower than the actual value.
SDK v1.0.0: Query results for field IDs greater than 1000 may be inaccurate.
SDK v1.2.0: The
dcgmicommand and DCGM API do not currently support querying utilization metrics such as TensorCore and pipe.Running without root permission disables features such as modifying the device configuration.
The
dcgmicommand does not currently support thestatssubcommand.The
dcgmi nvlinksubcommand does not currently support queryingicn errorinformation.The
dcgmi policysubcommand does not support setting error policy thresholds for PCIe or ICN.The
dcgmi healthsubcommand does not support subscribing to infoROM, thermal and power, or NVLink watches.The ICN link throughput rate represents the raw data throughput and includes overhead such as message headers.
Configuring or querying policy violations is not supported.
Sample-based queries, such as periodic temperature or power samples, are not supported.
Querying vGPU utilization and process information is not supported.
persistence modeis not supported.performance stateis not supported.Adjusting the memory clock frequency is not supported.
The
memory_bandwidthdiagnostic test fails if the PPU frequency does not reach its maximum.In rare cases, the "DCGM Failed to find any GPUs on the node" error may occur when you start
nv-hostengine. Residual files from older versions of the KMD or PPU SDK in the server environment can cause this error.