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—
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.8 | Exporter 4.9 and later | What it tells you | Use it for |
|---|---|---|---|
DCGM_FI_DEV_GPU_UTIL (%) | DCGM_FI_DEV_GPU_UTIL_RATIO | Time at least one kernel ran | Busy or idle, not how full |
DCGM_FI_PROF_SM_ACTIVE | DCGM_FI_PROF_SM_UTIL_RATIO | Share of cycles SMs have work | Real compute usage (off by default) |
DCGM_FI_PROF_SM_OCCUPANCY | DCGM_FI_PROF_SM_OCCUPANCY_RATIO | Resident warps versus maximum | Kernel tuning (off by default) |
DCGM_FI_PROF_PIPE_TENSOR_ACTIVE | DCGM_FI_PROF_TENSOR_UTIL_RATIO | Tensor core activity | Matrix work in training and inference |
DCGM_FI_PROF_DRAM_ACTIVE | DCGM_FI_PROF_DRAM_UTIL_RATIO | Memory bandwidth activity | Memory-bound workloads such as decoding |
DCGM_FI_DEV_FB_USED / _FREE (MiB) | DCGM_FI_DEV_FB_USED_BYTES / _FREE_BYTES | GPU memory | Out-of-memory risk for training |
DCGM_FI_DEV_POWER_USAGE | DCGM_FI_DEV_BOARD_POWER_WATTS | Power draw | Power-limit throttling |
DCGM_FI_DEV_GPU_TEMP | DCGM_FI_DEV_GPU_TEMP_CELSIUS | GPU temperature | Cooling problems |
DCGM_FI_DEV_SM_CLOCK (MHz) | DCGM_FI_DEV_SM_CLOCK_HERTZ | Current SM clock | Detecting slowdowns |
DCGM_FI_DEV_XID_ERRORS | DCGM_FI_DEV_XID_ERROR | Last XID error value | Hardware fault alerts |
DCGM_FI_DEV_UNCORRECTABLE_REMAPPED_ROWS | DCGM_FI_DEV_ROW_REMAP_UNCORRECTABLE_TOTAL | Rows remapped after uncorrectable errors | Drain and reset |
DCGM_FI_DEV_ROW_REMAP_FAILURE | DCGM_FI_DEV_ROW_REMAP_FAILED | Remapping failed | Replace the GPU |
Common XIDs and the usual response (check NVIDIA's XID catalog for your GPU and driver):
| XID | Meaning | Usual response |
|---|---|---|
| 79 | GPU has fallen off the bus | Cordon, drain, reset or reboot; report if it repeats |
| 48 | Double-bit (uncorrectable) ECC error | Restart the affected work; drain and reset if remapping follows |
| 13, 31, 43 | Often 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
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