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)

# one-liner from GitHub (works now, no PyPI account needed on your side)
pip install "git+https://github.com/Micuks/nvitop-cluster.git"
# or
uv pip install "git+https://github.com/Micuks/nvitop-cluster.git"

# one-shot (no persistent install)
uvx --from "git+https://github.com/Micuks/nvitop-cluster.git" nvitop-cluster

# PyPI (after a release is published)
pip install nvitop-cluster

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nvitop_cluster-0.1.0.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nvitop_cluster-0.1.0-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file nvitop_cluster-0.1.0.tar.gz.

File metadata

  • Download URL: nvitop_cluster-0.1.0.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for nvitop_cluster-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c93423ab0c2543d34bbf70d6ae1ceac7169162b595fc46713d661514f660de16
MD5 20a451990e4cb6e2301173872e61a5d9
BLAKE2b-256 7282859507efc4fc9aa0ecc0c1aeb2de307c2d393b2591ca0c70da1c6717b833

See more details on using hashes here.

File details

Details for the file nvitop_cluster-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nvitop_cluster-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for nvitop_cluster-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8436ed2168a8b6025ee44be9860e66d882d3d3dbfce59d4555b4323a3d50163
MD5 0588d174b785dfc0f4a83258449bd6a9
BLAKE2b-256 dea844a510a74ab6f5440aff188adfe52014903db407c78c965be41fe8a78558

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page