GPU software
nvidia-smi commands for monitoring GPU servers
On this page
nvidia-smi cheat sheet
| Task | Command |
|---|---|
| One snapshot of every GPU | |
| Refresh every 2 seconds | |
| List GPUs and their UUIDs | |
| Stream use, power, clocks and memory | |
| Processes and the memory they use | |
| Chosen metrics as CSV, every 10 seconds | |
| Temperature, power or ECC details | (or POWER, ECC) |
| How GPUs connect: NVLink, PCIe, NUMA | |
| NVLink status per link | |
Each command is explained below, with the AMD equivalents at the end of the page.
Watch GPUs live
nvidia-smi # one snapshot
nvidia-smi -l 2 # print a new snapshot every 2 seconds
watch -n 2 nvidia-smi # same, redrawn in place
Stream metrics with dmon
nvidia-smi dmon -s pucm -d 5
nvidia-smi --query-compute-apps=pid,process_name,used_memory --format=csv
dmon prints one line per GPU every 5 seconds (). The letters choose the metric groups: p power and temperature, u utilization, c clocks and m memory; add e for ECC and PCIe errors, t for PCIe throughput. limits it to some GPUs. The second command lists each process with the GPU memory it holds.
Log to CSV with --query-gpu
fields=timestamp,index,utilization.gpu,memory.used,memory.total
fields=$fields,temperature.gpu,power.draw,clocks.sm
nvidia-smi --query-gpu=$fields --format=csv -l 10 >> ~/gpu-metrics.csv
This appends one line per GPU every 10 seconds; run it in tmux or as a service. Use for files you parse with scripts. lists every field, such as temperature.memory on HBM GPUs.
nvtop, an htop for GPUs
sudo apt install -y nvtop
nvtop
nvtop draws utilization and memory charts for each GPU above a process list. Recent versions, such as the one in Ubuntu 24.04, also support AMD GPUs. Press Q to quit.
Long-term metrics with DCGM exporter and Prometheus
For history and alerts, NVIDIA's DCGM exporter publishes GPU metrics in Prometheus format, and Grafana can chart them. A minimal start with Docker, using the current tag from NVIDIA's NGC catalog in place of TAG:
docker run -d --name dcgm-exporter --gpus all --cap-add SYS_ADMIN \
-p 127.0.0.1:9400:9400 nvcr.io/nvidia/k8s/dcgm-exporter:TAG
curl -s http://127.0.0.1:9400/metrics \
| grep -E 'DCGM_FI_DEV_(GPU_UTIL|GPU_TEMP|POWER_USAGE|XID_ERRORS)'
You should see one value per GPU for each metric. Scrape it from your Prometheus server over private networking or an SSH tunnel, and alert on DCGM_FI_DEV_XID_ERRORS and on temperature. Never publish the metrics port to the internet. On AMD servers, AMD's device metrics exporter for Instinct GPUs plays the same role.
Temperature, power and ECC errors
nvidia-smi -q -d TEMPERATURE
nvidia-smi -q -d POWER,PERFORMANCE
nvidia-smi -q -d ECC
nvidia-smi -q -d ROW_REMAPPER
- Temperature. Compare the current reading with the "GPU Slowdown Temp" and "GPU Shutdown Temp" thresholds in the same output. Readings near the slowdown threshold reduce clocks.
- Power and clocks. The PERFORMANCE section lists clock event reasons. "SW Power Cap" under heavy load is normal; "HW Slowdown" or "HW Thermal Slowdown" while the GPU is busy is worth reporting.
- ECC.
Data center GPUs correct single-bit memory errors on the fly. Volatile counters reset when the driver reloads; aggregate counters cover the GPU's lifetime. Uncorrectable errors usually stop the running job. - Row remapping. HBM GPUs replace faulty memory rows. "Pending: Yes" means the GPU needs a reset or reboot to apply the remap. Repeated remaps or a remapping failure mean the GPU needs attention.
Xid errors and when to open a ticket
The NVIDIA driver reports GPU faults in the kernel log as Xid messages:
sudo dmesg -T | grep -i xid
sudo journalctl -k --since "24 hours ago" | grep -i xid
| Xid | Meaning | What to do |
|---|---|---|
| 13, 31, 43 | Graphics engine exception, GPU memory page fault, GPU stopped processing | Usually a bug or invalid memory access in the application. Open a ticket if they continue across different jobs. |
| 48, 94, 95 | Open a ticket. A contained error (94) stops only the affected application; after 95 the GPU must be reset. | |
| 63, 64 | Row remapping or page retirement event, or a failure to record it | Reboot to apply a pending remap. Open a ticket if it repeats or fails. |
| 74 | NVLink error | Open a ticket with the full log line. |
| 79 | GPU has fallen off the bus | Open a ticket. The GPU stays unavailable until the server is rebooted, and may need repair. |
In your ticket, include the server IP, the Xid lines and an NVIDIA bug report, which gathers the relevant logs in one file:
sudo nvidia-bug-report.sh
It writes to the current directory. Failed GPUs are replaced as a priority under our service level agreement, and engineers answer 24/7: open a support ticket from your dashboard.
AMD equivalents with rocm-smi and amd-smi
| Task | NVIDIA | AMD |
|---|---|---|
| Snapshot | | or |
| Live view | | watch |
| Streaming table | | |
| Use, memory, power, temperature | | |
| Processes | | |
| Kernel messages | sudo dmesg | sudo dmesg |
More on the AMD tools in ROCm setup.
Still stuck?
Open a ticket from your dashboard with the server, what you ran and any error output. An engineer replies 24/7.