# nvitop

> Interactive NVIDIA GPU and process monitor in Python with tree view, filtering, signal sending, a CUDA device selector (nvisel), and APIs for custom tools.

Stars: 7.2k · Language: Python · License: Apache-2.0 · Categories: System

- Repository: https://github.com/XuehaiPan/nvitop
- Website: https://nvitop.readthedocs.io
- Page: https://www.trmn.sh/tools/nvitop

## Install

- uvx: `uvx nvitop`
- pipx: `pipx run nvitop`
- pip: `pip3 install --upgrade nvitop`

## Overview

nvitop is an interactive monitor for NVIDIA GPUs and the processes running on them. It is a terminal tool written in pure Python, and it works as an alternative to nvidia-smi. It shows more information than nvidia-smi, with colorized box-drawing output. Its monitor mode keeps refreshing device and process status instead of printing once.

Monitor mode includes bar charts and history graphs, process sorting and filtering, and a tree-view screen for GPU processes and their parent processes. It also has an environment variable screen for a selected process, a help screen, and mouse support. You can send signals to processes with a keystroke. It queries devices through the NVML Python bindings (nvidia-ml-py) instead of parsing nvidia-smi output. It gets host process data through psutil, caches results with cachetools' TTLCache, renders with curses, and gathers data in multiple threads. It runs on Linux and Windows. On Windows it needs the windows-curses package, and mouse support may be missing in some terminals.

The package also ships nvisel, a CUDA visible devices selection tool aimed at deep learning researchers. It exposes Python APIs (Device, Process, a status snapshot, and a resource metric collector) for building custom monitoring tools, and the README describes low-level Device and Process classes, with Host APIs inherited from psutil. A separate nvitop-exporter component feeds a Grafana dashboard. The repository also includes a Bash script for installing NVIDIA drivers on Ubuntu. The main users are ML researchers, engineers and sysadmins who manage shared GPU machines, including over SSH or in Docker.

### Installation

```bash
# via uvx
uvx nvitop
```

```bash
# via pipx
pipx run nvitop
```

```bash
# via pip
pip3 install --upgrade nvitop
```

![Monitor](https://media.trmn.sh/cached/0e7841fb6cde4bac5d56d0be5b7d59e88334b1ce243795b05bc1bf63e0269ff3.png)

![Filter](https://media.trmn.sh/cached/b8d1c42d475e184c0d715e7d9c53f3ab80664600850a42cdb596d338dcfa37b0.png)

![Comparison](https://media.trmn.sh/cached/15f7377c3e0c6ea79b1fcbde3ae90d27ed1f6297ae196d6a0197e376bb058f7c.png)

## Alternatives

- [auto-cpufreq](https://www.trmn.sh/tools/auto-cpufreq.md): Linux CPU speed and power optimizer that adjusts governor and turbo boost based on battery state, CPU load and temperature. Includes CLI, daemon and GUI. (Python, 7.9k stars)
- [bpytop](https://www.trmn.sh/tools/bpytop.md): Terminal-based system resource monitor showing CPU, memory, disk, network and process usage with interactive interface (Python, 10.9k stars)
- [BorgBackup](https://www.trmn.sh/tools/borg.md): Deduplicating backup program with optional compression and authenticated encryption, supporting ssh, sftp, s3, b2 and rclone targets, and mountable archives. (Python, 13.9k stars)
- [tuptime](https://www.trmn.sh/tools/tuptime.md): System uptime tracking tool that preserves historical uptime/downtime statistics across reboots with detailed reporting (Python, 317 stars)
- [glances](https://www.trmn.sh/tools/glances.md): Cross-platform system monitoring tool with real-time stats display via terminal, web interface, or API (Python, 33.9k stars)

---

Canonical: https://www.trmn.sh/tools/nvitop
