Operations 5 min read

Mastering nvitop: Interactive NVIDIA GPU Monitoring and Management

This guide introduces nvitop, an interactive NVIDIA‑GPU process viewer and resource manager, explains its key features, shows how to install it via uvx/pipx, demonstrates basic device and process commands as well as the real‑time monitoring mode, and provides troubleshooting tips for common issues.

Efficient Ops
Efficient Ops
Efficient Ops
Mastering nvitop: Interactive NVIDIA GPU Monitoring and Management

What is nvitop?

nvitop is an interactive NVIDIA‑GPU process viewer and GPU resource management tool. It provides real‑time monitoring, process management, and an API for NVIDIA GPU environments.

Core Features

Rich and beautiful output : Colored frames with more detail than nvidia-smi.

Monitoring mode : Continuous resource monitor with process sorting, filtering, and GPU‑process/parent‑process view.

Interactivity : Responds to user input while monitoring.

Efficiency : Uses NVML Python bindings to query device status directly.

Portability : Works on Linux and Windows.

Integrability : Can be embedded in other applications.

Installation

Install in an isolated environment with uvx or pipx: uvx nvitop # or: pipx run nvitop Optional shell aliases:

# Bash
echo 'alias nvitop="uvx nvitop"' >> ~/.bashrc

# Zsh
echo 'alias nvitop="uvx nvitop"' >> ~/.zshrc

# Fish
mkdir -p ~/.config/fish
echo 'alias nvitop "uvx nvitop"' >> ~/.config/fish/config.fish

# PowerShell
New-Item -Path (Split-Path -Parent $PROFILE.CurrentUserAllHosts) -ItemType Directory -Force
'Function nvitop { uvx nvitop @Args }' >> $PROFILE.CurrentUserAllHosts

Basic Usage

Device and Process Management

# Show status of all devices
nvitop -1          # or: python3 -m nvitop -1

# Show specific devices by index
nvitop -1 -o 0 1   # shows GPU 0 and GPU 1 only

# Show devices listed in CUDA_VISIBLE_DEVICES
nvitop -1 -ov

# Show only GPU processes with a compute context (type C or C+G)
nvitop -1 -c

Interactive Monitoring Mode

Start the real‑time monitoring UI:

# Launch monitoring mode (auto detects terminal size)
nvitop

# Display modes
nvitop -m full      # full‑screen (shortcut ‘f’)
nvitop -m compact   # compact (shortcut ‘c’)
nvitop -m auto      # auto (shortcut ‘a’)

# Additional options
nvitop --light      # for light‑colored terminals
nvitop --colorful   # spectral bar chart
nvitop -U           # ASCII‑only mode

Press h for help, q to quit.

nvitop monitoring mode screenshot
nvitop monitoring mode screenshot

Troubleshooting

Common Issues

“nvitop: command not found”

Verify installation: pip3 show nvitop Check PATH: echo $PATH Run via module: python3 -m nvitop NVML initialization failure

Install the latest NVIDIA driver, e.g., bash install-nvidia-driver.sh --latest Confirm driver with nvidia-smi Terminal display problems

Use ASCII mode: nvitop -U Check terminal color support: nvitop --colorful Repository: https://github.com/XuehaiPan/nvitop

CLIpythonLinuxNVIDIAWindowsGPU MonitoringnvitopNVML
Efficient Ops
Written by

Efficient Ops

This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.