nvitop: Interactive GPU Process Monitor
nvitop is an htop-style interactive monitor for NVIDIA GPUs, showing utilization, memory, and per-process usage in a live TUI.
For live debugging on a GPU box, nvitop beats staring at nvidia-smi -l. It also has a one-shot mode that prints a rich snapshot suitable for CI logs.
What it does
nvitop uses NVML to render a live dashboard of GPUs and the processes on them, with memory and utilization bars and the ability to sort and kill processes. Its one-shot mode (-1) prints a single detailed snapshot and exits, which works in non-interactive logs.
Common usage
pip install nvitop
# interactive TUI
nvitop
# monitor mode, plain output every interval
nvitop -m
# one-shot snapshot for a CI log, then exit
nvitop -1Options
| Flag | What it does |
|---|---|
| (no args) | Interactive TUI monitor |
| -1 / --once | Print one snapshot and exit |
| -m / --monitor | Monitor mode with periodic refresh |
| --only <ids> | Restrict to specific GPUs |
| --gpu-util-thresh <n> | Thresholds for utilization coloring |
In CI
Use nvitop -1 (one-shot) rather than the interactive TUI in pipelines; the TUI expects a terminal and will not render usefully in a log. The snapshot gives a compact record of which processes held the GPU when the job ran.
Common errors in CI
Launching plain nvitop in CI can hang or produce garbled output because there is no interactive terminal; use -1 or -m instead. An NVML/driver error ("NVML Shared Library Not Found" or the driver-not-loaded message) means no GPU or a missing driver, the same root cause as an nvidia-smi failure. "nvitop: command not found" means it is not installed in the active Python environment.