Skip to content
,

nvidia-smi Explained: Output Fields, 30 Useful Commands and GPU Monitoring Cheat Sheet

A complete nvidia-smi guide and cheat sheet. Learn what every field in the default output means (including the commonly misunderstood CUDA Version and GPU-Util), then copy 30 practical commands for live monitoring, CSV logging, per-process memory, power limits, persistence mode, clocks and throttling, MIG, NVLink topology, ECC errors and resets, plus tips for Windows, WSL and clusters.

5 min read

nvidia-smi Explained — nvidia-smi

Short answer

nvidia-smi (NVIDIA System Management Interface) is the command-line tool installed with NVIDIA drivers for monitoring and managing NVIDIA GPUs on Linux and Windows. Run nvidia-smi to see each GPU's memory use, utilisation, temperature, power draw and running processes. Two fields are often misread: CUDA Version shows the highest CUDA version the driver supports, not the toolkit you installed, and GPU-Util is the percentage of time a kernel was running, not the share of GPU cores in use. The most useful commands are nvidia-smi -l 1 (refresh every second), nvidia-smi --query-gpu=... --format=csv (scriptable metrics), nvidia-smi dmon (rolling device stats) and sudo nvidia-smi -pl 300 (set a 300 W power limit).

Reading the default output

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.xx            Driver Version: 580.xx          CUDA Version: 13.0         |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 4090        Off |   00000000:01:00.0 Off |                  Off |
| 30%   45C    P2            210W /  450W |   18432MiB /  24564MiB |     87%      Default |
+-----------------------------------------+------------------------+----------------------+
FieldMeaning
Driver VersionInstalled NVIDIA driver
CUDA VersionMaximum CUDA version supported by this driver, not necessarily the installed toolkit (check nvcc --version or torch.version.cuda)
Persistence-MPersistence mode: keeps the driver loaded when no apps run (Linux)
Bus-IdPCI address of the GPU
Disp.AWhether a display is attached/initialised
Volatile Uncorr. ECCUncorrectable ECC errors since last reboot (data center/workstation GPUs)
FanFan speed as a percentage of maximum (N/A for passively cooled GPUs)
TempGPU core temperature in °C
PerfPerformance state from P0 (maximum) to P12 (idle)
Pwr:Usage/CapCurrent power draw / power limit
Memory-UsageVRAM used / total
GPU-UtilPercentage of time over the sample period that one or more kernels were executing
Compute M.Compute mode (Default, Exclusive_Process, Prohibited)
MIG M.Multi-Instance GPU mode (A100/H100/H200/B200 class)

The processes table below lists each process's PID, type (C = compute, G = graphics) and GPU memory.

Important: 100% GPU-Util does not mean the GPU is fully used. A single small kernel running constantly shows 100%. For real efficiency, look at SM activity and tensor core usage with tools like DCGM or Nsight, and at MFU.

Monitoring commands

TaskCommand
Snapshot of all GPUsnvidia-smi
Refresh every secondnvidia-smi -l 1 or watch -n 1 nvidia-smi
List GPUs and UUIDsnvidia-smi -L
Show only GPU 0nvidia-smi -i 0
Full detailsnvidia-smi -q
Specific sectionsnvidia-smi -q -d MEMORY,UTILIZATION,TEMPERATURE,POWER,CLOCK
Rolling device statsnvidia-smi dmon (power, temp, SM %, memory %, clocks)
Rolling per-process statsnvidia-smi pmon
Processes using GPUs (CSV)nvidia-smi --query-compute-apps=pid,process_name,used_memory --format=csv
List queryable fieldsnvidia-smi --help-query-gpu

Scriptable queries and logging

nvidia-smi --query-gpu=timestamp,index,name,temperature.gpu,utilization.gpu,utilization.memory,memory.used,memory.total,power.draw,power.limit,clocks.sm \
  --format=csv -l 5 > gpu_log.csv
Useful fieldMeaning
utilization.gpuKernel-active time %
utilization.memory% of time memory was being read or written
memory.used / memory.totalVRAM usage
temperature.gpu / temperature.memoryCore and memory temperature (memory not on all GPUs)
power.draw / power.limitWatts used and allowed
clocks.sm / clocks.memCurrent clocks
pstatePerformance state
fan.speedFan %
pcie.link.gen.current / pcie.link.width.currentPCIe link status
clocks_event_reasons.activeWhy clocks are reduced (throttling)

Add ,noheader,nounits to --format=csv for clean output in scripts.

Power, clocks and performance

TaskCommand
Set power limit to 300 Wsudo nvidia-smi -pl 300
Set limit on GPU 1 onlysudo nvidia-smi -i 1 -pl 250
Show allowed power rangenvidia-smi -q -d POWER
Enable persistence modesudo nvidia-smi -pm 1
Lock GPU clocks (min,max MHz)sudo nvidia-smi -lgc 1500,1800
Reset locked clockssudo nvidia-smi -rgc
See throttling reasonsnvidia-smi -q -d PERFORMANCE

Why power-limit for AI? Many AI workloads lose only a little speed at 70–85% of maximum power while running cooler and quieter. Settings reset on reboot unless applied by a startup script. See GPU power consumption for AI.

TaskCommand
Show GPU interconnect topologynvidia-smi topo -m
NVLink statusnvidia-smi nvlink -s
NVLink capabilitiesnvidia-smi nvlink -c
Choose GPUs for a programCUDA_VISIBLE_DEVICES=0,1 python train.py (environment variable, not an nvidia-smi command)

The topology matrix shows whether GPUs connect via NVLink (NV#), the same PCIe switch (PIX), or across CPU sockets (SYS), which affects multi-GPU performance. See NVLink and NVSwitch explained and multi-GPU LLM setup.

MIG (Multi-Instance GPU)

On supported data center GPUs (A100, H100, H200, B200):

TaskCommand
Enable MIG on GPU 0sudo nvidia-smi -i 0 -mig 1
List available profilesnvidia-smi mig -lgip
Create GPU and compute instancessudo nvidia-smi mig -cgi <profile-ids> -C
List instancesnvidia-smi mig -lgi
Destroy instancessudo nvidia-smi mig -dci && sudo nvidia-smi mig -dgi

See NVIDIA H100 specs for MIG sizes.

Troubleshooting

ProblemCommand / action
Check ECC errorsnvidia-smi -q -d ECC
Check retired / remapped memory rowsnvidia-smi -q -d ROW_REMAPPER (newer GPUs) or -d PAGE_RETIREMENT
Reset a hung GPU (no processes running)sudo nvidia-smi -r -i 0
Kill a process holding memoryFind PID with nvidia-smi, then kill <PID>
"No devices were found"Driver not loaded; check that the nvidia kernel module is loaded (lsmod), reinstall driver, check BIOS/PCIe
"Failed to initialize NVML: Driver/library version mismatch"Driver updated but kernel module not reloaded: reboot
Memory used but no processes listedContainers or other namespaces may hide PIDs; check from the host

Also check kernel logs for Xid errors (sudo dmesg | grep -i xid), which indicate driver or hardware faults. For memory errors in your code, see CUDA out of memory.

Windows, WSL and containers

  • Windows: nvidia-smi is installed with the driver (in C:\Windows\System32); run it from Command Prompt or PowerShell. Some fields and settings (like persistence mode) are Linux-only.
  • WSL 2: nvidia-smi works inside WSL with Windows NVIDIA drivers; don't install Linux display drivers inside WSL.
  • Docker: with the NVIDIA Container Toolkit, run docker run --gpus all nvidia/cuda:<tag> nvidia-smi to verify GPU access.

Beyond nvidia-smi

ToolUse
nvtopInteractive htop-style GPU monitor
gpustatCompact one-line-per-GPU status
NVIDIA DCGM / dcgm-exporterCluster monitoring with Prometheus/Grafana, detailed SM and tensor activity
Nsight Systems / Nsight ComputeProfiling kernels and timelines
torch.cuda.memory_summary()PyTorch memory breakdown

Frequently asked questions

What does nvidia-smi stand for?

NVIDIA System Management Interface, built on the NVIDIA Management Library (NVML).

Why does nvidia-smi show a different CUDA version than nvcc?

nvidia-smi shows the highest CUDA version the driver supports; nvcc shows the installed CUDA toolkit. They are often different, and that's normal as long as the toolkit isn't newer than the driver supports.

What does GPU-Util mean in nvidia-smi?

The percentage of time during the sample period that at least one kernel was running. It doesn't measure how many cores were busy.

How do I monitor GPU usage continuously?

Use nvidia-smi -l 1, watch -n 1 nvidia-smi, nvidia-smi dmon, or log metrics with --query-gpu ... --format=csv -l 5.

How do I limit GPU power with nvidia-smi?

Run sudo nvidia-smi -pl <watts>; check allowed values with nvidia-smi -q -d POWER.

Sources and further reading

Think you understand it now? Prove it.

Solve real Tensor Core math in the TensorCore.si Challenge and earn a certificate with your name.

Take the challenge

Leave a Reply

Your email address will not be published. Required fields are marked *