3.3 Monitoring GPUs
The DCGM metrics that matter and how to export them to Prometheus.
Key points
Field 311 counts double-bit volatile ECC errors. A double-bit error cannot be corrected by ECC, so any non-zero value is significant. NVIDIA's Xid Catalog logs uncorrectable errors as Xid 48, with RESET_GPU and RUN_FIELDDIAG as the actions when it appears alone.
What NVIDIA says (3)
“DCGM_FI_DEV_ECC_DBE_VOL_TOTAL 311 Total double bit volatile ECC errors.”
“This event is logged when the GPU detects that an uncorrectable error occurs on the GPU.”
“WORKFLOW_XID_48 Data Center Recovery Action Solo: RESET_GPU”
When a GPU lowers its clocks to protect itself, the reason is recorded as a clock event. DCGM field 112 reports the current clock event reasons as a bitmask, so you can see whether heat, power or something else caused the drop. Field 100 shows the clock value, but not the reason.
What NVIDIA says (2)
“DCGM_FI_DEV_CLOCKS_EVENT_REASONS 112 Current clock event reasons (bitmask of DCGM_CLOCKS_EVENT_REASON_*)”
“DCGM_FI_DEV_SM_CLOCK 100 SM clock for the device.”
DCGM (Data Center GPU Manager) exposes GPU telemetry as numbered fields. Field 310, DCGM_FI_DEV_ECC_SBE_VOL_TOTAL, is the total of single-bit volatile ECC errors. Volatile means the count since the driver last loaded. Single-bit errors are corrected, so the trend matters more than any one value.
What NVIDIA says (1)
“DCGM_FI_DEV_ECC_SBE_VOL_TOTAL 310 Total single bit volatile ECC errors.”
Prometheus is an open-source monitoring system that scrapes metrics over HTTP. DCGM Exporter exposes GPU metrics at an HTTP /metrics endpoint for tools such as Prometheus. Its default listen address is :9400.
What NVIDIA says (2)
“DCGM Exporter is written in Go and exposes GPU metrics at an HTTP endpoint ( /metrics ) for monitoring solutions such as Prometheus.”
“Address of listening http server. Default: “:9400””
DCGM (Data Center GPU Manager) is NVIDIA's suite for managing and monitoring data center GPUs. NVIDIA says it includes active health monitoring, diagnostics, system alerts and governance policies such as power and clock management. Teams can use it alone or integrate it into cluster management and monitoring tools.
What NVIDIA says (5)
“Active Health Checks (GPU subsystems)”
“GPU Diagnostics (Diagnostic Levels - 1, 2, 3)”
“It includes active health monitoring, comprehensive diagnostics, system alerts, and governance policies including power and clock management.”
“The core DCGM library can be run as a standalone process or be loaded by an agent as a shared library.”
“Infrastructure teams can use it standalone and in addition easily integrate it into cluster management tools, resource scheduling, and monitoring products from NVIDIA partners.”
A streaming multiprocessor (SM) is one of the many processing blocks inside a GPU. DCGM defines graphics engine activity as the fraction of time any portion of the graphics or compute engines were active. So it can be high while most SMs are idle. DCGM's SM activity metric is the fraction of time at least one warp was active, averaged over all SMs. A warp is a group of threads the SM runs together. That metric shows how much of the chip is really working.
What NVIDIA says (2)
“Graphics Engine Activity The fraction of time any portion of the graphics or compute engines were active.”
“SM Activity The fraction of time at least one warp was active on a multiprocessor, averaged over all multiprocessors.”
Xid errors are driver error reports, and each number points to a different problem. DCGM field 230, DCGM_FI_DEV_XID_ERROR, reports Xid errors, and its value is the specific Xid. Exported through DCGM Exporter, it lets an alert rule fire on the exact Xid.
What NVIDIA says (1)
“DCGM_FI_DEV_XID_ERROR 230 # XID errors. The value is the specific XID error”
Different GPUs slow down at different temperatures, so a fixed number can be too early on one model and too late on another. DCGM field 153 reports the thermal margin: the distance to the nearest slowdown threshold for that GPU. Alerting on a small margin works across GPU models.
What NVIDIA says (2)
“DCGM_FI_DEV_GPU_TEMP_MARGIN_CELSIUS 153 # Thermal margin temperature (distance to nearest slowdown threshold) for this GPU.”
“DCGM_FI_DEV_GPU_TEMP_SLOWDOWN_CELSIUS 158 # Slowdown temperature for the device.”
GPU memory (HBM) has its own temperature, separate from the GPU core. DCGM field 140 reports the memory temperature, while field 150 reports the GPU temperature. Watching both catches heat problems the core reading misses.
What NVIDIA says (2)
“DCGM_FI_DEV_MEMORY_TEMP_CELSIUS 140 # Memory temperature for the device.”
“DCGM_FI_DEV_GPU_TEMP_CELSIUS 150 # Current temperature readings for the device, in degrees C.”
When a GPU hits its power or thermal limit, it lowers clocks and work slows down. DCGM fields 240 and 241 count the time spent in power and thermal violation, in nanoseconds. A growing counter during a job shows how much of the run was limited.
What NVIDIA says (2)
“DCGM_FI_DEV_POWER_VIOLATION 240 # Power Violation time in ns.”
“DCGM_FI_DEV_THERMAL_VIOLATION 241 # Thermal Violation time in ns.”
A100 and later GPUs repair bad memory rows by remapping them to spare rows, and the remap takes effect after a GPU reset. DCGM field 396 shows whether a remap is pending, and field 395 shows whether remapping has failed. Fields 393 and 394 count remapped rows for uncorrectable and correctable errors.
What NVIDIA says (4)
“The process of row-remapping requires a GPU reset to take effect and will remain persistent throughout the life of the life of the GPU.”
“DCGM_FI_DEV_ROW_REMAP_FAILED 395 # Whether remapping of rows has failed.”
“DCGM_FI_DEV_ROW_REMAP_PENDING 396 # Whether remapping of rows is pending.”
“DCGM_FI_DEV_PAGE_RETIRED_PENDING 392 # Whether any pages are pending retirement (1=yes, 0=no) DCGM_FI_DEV_ROW_REMAP_UNCORRECTABLE_TOTAL 393 # Number of remapped rows for uncorrectable errors.”
Charge-back needs per-job numbers. DCGM job statistics gather and aggregate data in the background across a workload's lifetime and GPUs, and can be queried by job id. Field 156 reports total energy consumption in millijoules since the driver was last reloaded, so the difference between job start and end gives the energy used.
What NVIDIA says (3)
“Job Statistics # DCGM provides background data gathering and analysis capabilities, including the ability to aggregate data across the lifetime of a target workload and across the GPUs involved.”
“The user can query the job stats using the job id and get aggregated stats across all the pids during the window of interest.”
“DCGM_FI_DEV_TOTAL_ENERGY_CONSUMPTION 156 # Total energy consumption for the GPU in mJ since the driver was last reloaded.”
nv-hostengine is the DCGM daemon: a standalone process that hosts the DCGM library, which tools such as dcgmi talk to. DCGM Exporter, by default, starts nv-hostengine as an embedded process to collect metrics. NVIDIA says to use the right configuration options when the system (such as a DGX) already runs nv-hostengine, and documents connecting to an existing DCGM agent.
What NVIDIA says (2)
“Because DCGM Exporter starts nv-hostengine as an embedded process (for collecting metrics), appropriate configuration options should be used if DCGM Exporter is run on systems (such as NVIDIA DGX) that have DCGM (or rather nv-hostengine ) running.”
“Its main job is to instantiate the DCGM library as a persistent standalone process, including appropriate management of the monitoring and management activities.”
To tie GPU usage to workloads, metrics need pod labels. The DCGM Exporter documentation lists DCGM_EXPORTER_KUBERNETES to enable mapping metrics to Kubernetes pods, and DCGM_EXPORTER_INTERVAL with a default of 30000 ms. Shorter intervals give finer detail but more load.
What NVIDIA says (1)
“Default: 30000 -c Interval $DCGM_EXPORTER_KUBERNETES Enable kubernetes mapping metrics to kubernetes pods.”
Human-readable output changes between versions and is hard to parse. nvidia-smi selective query options let you list exactly the properties you want, for example --query-gpu=pci.bus_id,persistence_mode, or --query-remapped-rows for row remapping data. These options require --format=csv.
What NVIDIA says (3)
“Pass comma separated list of properties you want to query. e.g. --query-gpu=pci.bus_id,persistence_mode.”
“Call --help-query-retired-pages for more info. --query-remapped-rows= Information about remapped rows.”
“[mandatory] --format= Comma separated list of format options: csv - comma separated values (MANDATORY)”
Key terms
- Dynamic page retirement: How the NVIDIA driver on pre-Ampere GPUs stops using memory pages with bad cells; the GPU keeps working, and the pages are excluded (blacklisted) the next time the GPU is reattached, such as after a reset, driver reload or reboot.
- Row remapping: The Ampere-and-later replacement for page retirement: the GPU swaps a degraded memory row for a spare one in hardware; it takes effect after a GPU reset, and a set row-remapping failure flag validated by the field diagnostic meets the RMA criteria.
- ECC: Memory protection that fixes single-bit errors and detects double-bit errors.
- DCGM: NVIDIA tooling for GPU health monitoring, diagnostics, alerts and policies across a cluster.
- DCGM Exporter: A service that publishes DCGM GPU metrics on an HTTP /metrics endpoint for Prometheus.
- Prometheus: An open-source monitoring system that collects metrics, such as DCGM Exporter GPU metrics, from /metrics endpoints.
Try it
Sample question
DCGM field 311 (DCGM_FI_DEV_ECC_DBE_VOL_TOTAL) reads 1 on GPU 3. What has happened?
Show the answer
Answer: The GPU recorded a double-bit ECC error, which is uncorrectable. The Xid Catalog treats it as Xid 48: reset the GPU and run field diagnostics.
Field 311 counts double-bit volatile ECC errors. A double-bit error cannot be corrected by ECC, so any non-zero value is significant. NVIDIA's Xid Catalog logs uncorrectable errors as Xid 48, with RESET_GPU and RUN_FIELDDIAG as the actions when it appears alone.
What NVIDIA says (3)
“DCGM_FI_DEV_ECC_DBE_VOL_TOTAL 311 Total double bit volatile ECC errors.”
“This event is logged when the GPU detects that an uncorrectable error occurs on the GPU.”
“WORKFLOW_XID_48 Data Center Recovery Action Solo: RESET_GPU”
Practice 3.3 (15 questions) Full AI Operations guide
← 3.2 Orchestration and job scheduling · 3.4 Virtualizing GPUs →