Skip to main content

nvitop-cluster

Multi-node GPU monitor for training clusters: read MPI/OpenMPI hostfile, query each host (local NVML / remote SSH), show nvitop-style UTIL/MEM bars, temperatures, power, and resolved process command lines.

Designed for multi-node jobs (e.g. DeepSpeed / torchrun / MPI) where plain nvitop only sees the current machine.

Screenshot

nvitop-cluster sample

Sample from a 2-node × 8-GPU job (/etc/mpi/hostfile). Bars = GPU util (left) / memory (right). Second line per GPU is the process command (Ctrl-A / Ctrl-E switch head vs tail when truncated).

Features

  • Hostfile discovery: /etc/mpi/hostfile, /etc/mpi/mpi-hostfile, or -f PATH
  • Local + remote: local probe without SSH; peers via ssh (optional KML-style ssh_config)
  • Wide dual bars: GPU-Util and Memory-Usage (width scales with terminal)
  • Process names: optional host-PID → container-PID remap for Kubernetes/container jobs
  • Watch mode by default (2s); keys:
    • Ctrl-A / a — CMD head (like nvitop)
    • Ctrl-E / e — CMD tail
    • v — verbose full cmdline
    • q — quit

Install

Zero third-party Python deps (stdlib only). Needs Python ≥ 3.9, nvidia-smi on each node, and SSH to peers for multi-node.

pip / uv (recommended)

pip install nvitop-cluster
# or
uv pip install nvitop-cluster

# one-shot without installing into the env
uvx nvitop-cluster

# from GitHub (latest main)
pip install "git+https://github.com/Micuks/nvitop-cluster.git"

Then:

nvitop-cluster
# or
python -m nvitop_cluster

Multi-node tip: either install the package in the same image/env on every rank, or put the repo on a shared path and set NVITOP_CLUSTER_HOME so remote SSH probes can find the script.

From source (no install)

git clone https://github.com/Micuks/nvitop-cluster.git
cd nvitop-cluster
python3 -m nvitop_cluster
# or
./nvitop-cluster

Optional (local interactive nvitop + container PID fix):

pip install 'nvitop-cluster[nvitop]'
# then: nvitop_cluster/nvitop --cluster

Usage

# multi-node table (default: watch 2s)
nvitop-cluster

# once
nvitop-cluster -1

# custom hostfile / SSH config
nvitop-cluster -f /path/to/hostfile
export NVITOP_CLUSTER_SSH_CONFIG=~/.ssh/config

# via nvitop-compatible wrapper (optional extra)
python3 -m nvitop_cluster  # same as nvitop-cluster

Hostfile format

10.0.0.1 slots=8
10.0.0.2 slots=8

(Also accepts bare hostnames / host:slots.)

Environment

Variable Meaning
NVITOP_CLUSTER_HOME Directory containing probe scripts (default: package dir)
NVITOP_CLUSTER_SSH_CONFIG SSH config for peers (default: /etc/kml/ssh/ssh_config if present)
NVITOP_HOSTFILE Extra hostfile path candidate
NVITOP_CLUSTER=1 Force cluster mode when using the nvitop wrapper

Container / Kubernetes note

On many GPU pods, NVML reports host PIDs while /proc only has namespace PIDs, so process names become N/A. nvitop_pid_map.py remaps host→local PIDs (heuristic: rank / device / RSS). Works on each node when share storage holds the same scripts (or install the package everywhere).

Layout (vs plain nvitop)

nvitop nvitop-cluster
Scope Current host All hostfile hosts
UI Full interactive TUI Watch table + keys
Remote — SSH probe
Processes Yes Yes (resolved when possible)

License

Apache-2.0 (see LICENSE).

Related

  • nvitop — single-node interactive viewer
  • all-smi — multi-host accelerator TUI
  • gpustat-web — multi-node web dashboard

Metadata

Release files for nvitop-cluster 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nvitop-cluster 0.1.1
File Size Uploaded
nvitop_cluster-0.1.1.tar.gz 20.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nvitop-cluster 0.1.1
File Interpreter ABI Platform
nvitop_cluster-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 41.6 kB

Release files / nvitop_cluster-0.1.1.tar.gz

Download URL nvitop_cluster-0.1.1.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
388297ef4d36e5d23b90ea36072b9f40e4e5c25781b05cb206d243b511d621d4
BLAKE2b-256 checksum
How to use checksums
26429debfa296cacc75a8d332f98f53435fdbe93880a45e03c5f42398b02dc0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / nvitop_cluster-0.1.1-py3-none-any.whl

Download URL nvitop_cluster-0.1.1-py3-none-any.whl
Size 20.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56e061cbdccb091e05dcd4745b57ee71e6accb0a3cbf7990a63c24ef3b24f778
BLAKE2b-256 checksum
How to use checksums
89cecf1e3b922c7ed6e3e07befbcde6719c8c51c8fb01ac4b97a9b8f190d6cd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page