Skip to main content
AI on Kubernetes · GPU/NPULesson 6 of 20

Monitoring GPUs on Kubernetes

A GPU node is expensive, and it can be busy, idle, overheating or broken while every Pod still looks Running. Follow GPU metrics from the card to Prometheus, learn which numbers show real work, and see which errors mean the node must be drained.

GPU_UTIL—
SM active—
Tensor active—
FB used—
Health—
GPU node · gpu-node-1gpu-0H100gpu-1H100llm-servens chattrain-bns mlDCGM exporterDaemonSet · :9400kubeletpod-resources APIPrometheusscrapes /metricsAlert rulesPrometheusRuleDashboardper Pod, per GPUOn-callcordon and drainusesuses
RequestResponse / reportAppears in a later step

What you will learn

  • How the DCGM exporter gets metrics into Prometheus
  • How metrics get pod and namespace labels
  • Why GPU utilization misleads, and the profiling metrics to use
  • Memory, power, temperature and throttling
  • XID, ECC, row remapping and NVLink errors, and alert rules

Key DCGM metrics​

DCGM exporter 4.9 renamed many default metrics to DCGM 4.7 names and changed some units (for example percent to a 0–1 ratio, MiB to bytes). Use the column that matches your exporter version.

Up to exporter 4.8Exporter 4.9 and laterWhat it tells youUse it for
DCGM_FI_DEV_GPU_UTIL (%)DCGM_FI_DEV_GPU_UTIL_RATIOTime at least one kernel ranBusy or idle, not how full
DCGM_FI_PROF_SM_ACTIVEDCGM_FI_PROF_SM_UTIL_RATIOShare of cycles SMs have workReal compute usage (off by default)
DCGM_FI_PROF_SM_OCCUPANCYDCGM_FI_PROF_SM_OCCUPANCY_RATIOResident warps versus maximumKernel tuning (off by default)
DCGM_FI_PROF_PIPE_TENSOR_ACTIVEDCGM_FI_PROF_TENSOR_UTIL_RATIOTensor core activityMatrix work in training and inference
DCGM_FI_PROF_DRAM_ACTIVEDCGM_FI_PROF_DRAM_UTIL_RATIOMemory bandwidth activityMemory-bound workloads such as decoding
DCGM_FI_DEV_FB_USED / _FREE (MiB)DCGM_FI_DEV_FB_USED_BYTES / _FREE_BYTESGPU memoryOut-of-memory risk for training
DCGM_FI_DEV_POWER_USAGEDCGM_FI_DEV_BOARD_POWER_WATTSPower drawPower-limit throttling
DCGM_FI_DEV_GPU_TEMPDCGM_FI_DEV_GPU_TEMP_CELSIUSGPU temperatureCooling problems
DCGM_FI_DEV_SM_CLOCK (MHz)DCGM_FI_DEV_SM_CLOCK_HERTZCurrent SM clockDetecting slowdowns
DCGM_FI_DEV_XID_ERRORSDCGM_FI_DEV_XID_ERRORLast XID error valueHardware fault alerts
DCGM_FI_DEV_UNCORRECTABLE_REMAPPED_ROWSDCGM_FI_DEV_ROW_REMAP_UNCORRECTABLE_TOTALRows remapped after uncorrectable errorsDrain and reset
DCGM_FI_DEV_ROW_REMAP_FAILUREDCGM_FI_DEV_ROW_REMAP_FAILEDRemapping failedReplace the GPU

Common XIDs and the usual response (check NVIDIA's XID catalog for your GPU and driver):

XIDMeaningUsual response
79GPU has fallen off the busCordon, drain, reset or reboot; report if it repeats
48Double-bit (uncorrectable) ECC errorRestart the affected work; drain and reset if remapping follows
13, 31, 43Often application faults (bad kernel, illegal address)Look at the application first; no node action if the GPU is otherwise healthy

Try it yourself​

# Is the exporter running on every GPU node?
kubectl get daemonset -A | grep -i dcgm

# Read raw metrics (GPU Operator Service name; adjust namespace and name)
kubectl -n gpu-operator port-forward svc/nvidia-dcgm-exporter 9400:9400 &
curl -s localhost:9400/metrics | grep -E '^DCGM_FI_(DEV_GPU_UTIL|PROF_)' | head
curl -s localhost:9400/metrics | grep -E 'XID|REMAP' # errors and row remapping

# Do the series carry pod labels?
curl -s localhost:9400/metrics | grep -m3 'pod="'

# On the node: kernel log XIDs and the GPU's own view
sudo dmesg | grep -i xid
nvidia-smi -q -d ECC,ROW_REMAPPER

# Take a faulty GPU node out of service
kubectl cordon gpu-node-1
kubectl drain gpu-node-1 --ignore-daemonsets --delete-emptydir-data

Check yourself

  1. A serving Pod shows DCGM_FI_DEV_GPU_UTIL near 100% but SM active of 0.3. What does this most likely mean?
  2. A GPU node logs XID 79. What is the right response?
  3. Why is "FB used above 90%" a poor alert for a vLLM serving Pod?

Further reading: DCGM exporter metrics · DCGM exporter on GitHub · NVIDIA XID errors · NVIDIA GPU debug guidelines · How GPUs and NPUs become node resources (device plugins) · Autoscaling LLM Inference