When to reach for it
You have a GPU node that is slow, out of memory, or not serving, and you need answers in the next five minutes. nvidia-smi ships with the driver, so it is on every working GPU host and inside any container that the NVIDIA Container Toolkit has set up. Prometheus and DCGM give you history. nvidia-smi shows you what the GPU is doing right now.
Tip
Field names for
--query-gpuchange between driver releases. Runnvidia-smi --help-query-gpuon the node to see what that driver supports before you script against a field.
Inventory: what is in this box
| Task | Command |
|---|---|
| List GPUs with UUIDs | nvidia-smi -L |
| Summary table (default view) | nvidia-smi |
| Driver and CUDA version the driver supports | nvidia-smi --query-gpu=driver_version --format=csv,noheader (CUDA version is in the header of plain nvidia-smi) |
| Model, memory, PCI bus per GPU | nvidia-smi --query-gpu=index,name,uuid,memory.total,pci.bus_id --format=csv |
| Full detail for one GPU | nvidia-smi -q -i 0 |
| One section only | nvidia-smi -q -d MEMORY (also UTILIZATION, TEMPERATURE, POWER, CLOCK, PERFORMANCE, ECC) |
The "CUDA Version" in the nvidia-smi header is the highest CUDA runtime that driver supports. It is not the toolkit version installed in your container. If a framework says no GPU is available, compare the two (see the driver and CUDA mismatch post).
Memory and utilisation
# One CSV line per GPU, refreshed every 5 seconds
nvidia-smi --query-gpu=index,utilization.gpu,utilization.memory,memory.used,memory.total,temperature.gpu,power.draw \
--format=csv,noheader,nounits -l 5
| Field | Meaning on an inference node |
|---|---|
utilization.gpu | Percent of time at least one kernel was running. 100% does not mean the GPU is saturated. |
utilization.memory | Percent of time memory was being read or written |
memory.used | Memory allocated. vLLM and similar servers pre-allocate most of the card for KV cache, so 90%+ is normal for them. |
power.draw | Watts now. A busy card well below its power limit often means it is waiting on input. |
For a rolling per-second view that is easy to read during an incident:
nvidia-smi dmon -s pucm -d 1 # p=power/temp, u=utilisation, c=clocks, m=memory
Who is using the GPU
nvidia-smi --query-compute-apps=gpu_uuid,pid,process_name,used_memory --format=csv
nvidia-smi pmon -c 5 # per-process SM and memory utilisation, 5 samples
Inside a container, PIDs belong to the host PID namespace and may not match ps in the container. On a Kubernetes node, map the PID to a pod:
# On the node (or a debug pod with hostPID)
cat /proc/<pid>/cgroup | grep -o 'pod[0-9a-f_-]*'
kubectl get pods -A -o wide --field-selector spec.nodeName=<node>
To run nvidia-smi inside an inference pod:
kubectl exec -it -n <ns> <pod> -- nvidia-smi
If the command is missing or reports no devices inside the pod but works on the node, the pod did not get a GPU. Check resources.limits["nvidia.com/gpu"] and the device plugin.
Clocks, power and throttling
A GPU that reports high utilisation but low throughput is often running at reduced clocks.
nvidia-smi -q -d PERFORMANCE # shows active throttle / clock event reasons
nvidia-smi -q -d CLOCK,POWER
nvidia-smi --query-gpu=index,clocks.sm,clocks.max.sm,power.draw,power.limit,temperature.gpu --format=csv
| Reason shown | Likely cause | Fix |
|---|---|---|
| SW Power Cap | Card at its power limit | Expected under heavy load; check power.limit was not lowered |
| HW Slowdown / HW Thermal Slowdown | Overheating or power brake | Check fans, airflow, host cooling; open a hardware ticket on cloud VMs |
| SW Thermal Slowdown | Temperature above target | Same as above |
| Idle | No work submitted | The bottleneck is upstream (tokenisation, batching, network) |
On recent drivers this section is called "Clocks Event Reasons" and the query fields are clocks_event_reasons.*. Older drivers use "Clocks Throttle Reasons" and clocks_throttle_reasons.*. Check --help-query-gpu for your driver.
Errors: ECC, row remapping and Xid
nvidia-smi -q -d ECC
nvidia-smi --query-gpu=index,ecc.errors.uncorrected.volatile.total,ecc.errors.corrected.volatile.total --format=csv
nvidia-smi -q -d ROW_REMAPPER # Ampere and newer
nvidia-smi -q -d PAGE_RETIREMENT # older architectures
dmesg -T | grep -i xid # driver-reported GPU faults
| Finding | What to do |
|---|---|
| Uncorrected volatile ECC errors > 0 | Drain the node; the GPU needs a reset or replacement |
| "Remapping pending: Yes" | Reset the GPU or reboot to apply the remap, then re-check |
| "Remapping failure occurred: Yes" | Replace the GPU or VM |
| Xid 79 "fallen off the bus", Xid 48 double-bit ECC | Follow the Xid triage runbook; usually a reboot or replacement |
Topology and NVLink
For multi-GPU tensor parallel serving, check how GPUs connect before blaming NCCL:
nvidia-smi topo -m # matrix: NV# = NVLink, PIX/PXB = PCIe switch, SYS = across CPU sockets
nvidia-smi nvlink -s # per-link status and speed
SYS between GPUs in the same tensor parallel group means traffic crosses the CPU interconnect and will be slower. Pin the group to GPUs connected by NVLink or the same PCIe switch.
MIG
nvidia-smi -i 0 --query-gpu=mig.mode.current,mig.mode.pending --format=csv
nvidia-smi mig -lgip # available GPU instance profiles
nvidia-smi mig -lgi # GPU instances created
nvidia-smi -L # also lists MIG devices with their UUIDs
With MIG enabled, nvidia-smi cannot show per-instance utilisation. Use DCGM for that.
Changing settings
These commands change GPU state. Run them only on a drained node or during a planned change.
| Task | Command |
|---|---|
| Enable persistence mode (keeps the driver loaded, faster first call) | sudo nvidia-smi -pm 1 |
| Set power limit (watts) | sudo nvidia-smi -i 0 -pl 300 |
| Set compute mode to one process per GPU | sudo nvidia-smi -i 0 -c EXCLUSIVE_PROCESS |
| Enable MIG mode | sudo nvidia-smi -i 0 -mig 1 (then reset the GPU) |
| Reset a GPU | sudo nvidia-smi --gpu-reset -i 0 |
Warning
--gpu-resetfails if any process is using the GPU, and it kills in-flight work. On Kubernetes, cordon and drain the node first, and stopnvidia-persistencedand DCGM exporters if they hold the device. Many cloud VMs do not support reset; reboot the VM instead.
Prefer nvidia-persistenced (the daemon) over -pm 1 where your distribution ships it. Persistence mode set with -pm does not survive a reboot.
Quick triage sequence
nvidia-smi- do all GPUs appear, and is anything at 100% memory with no processes listed?nvidia-smi --query-compute-apps=...- which process owns the memory?nvidia-smi -q -d PERFORMANCE- is the card throttled?nvidia-smi -q -d ECC,ROW_REMAPPERplusdmesg | grep -i xid- is the hardware healthy?nvidia-smi topo -m- for multi-GPU problems, is the topology what the serving config assumes?
Prevent it next time
- Export the same fields continuously with DCGM Exporter so you have history, not just a snapshot.
- Alert on uncorrected ECC errors, pending row remaps and Xid events, and cordon the node automatically.
- Enable persistence on every GPU node through the image or the GPU Operator, not by hand.
- Keep a small script with your standard
--query-gpufields in the node image so everyone on call runs the same checks.