Skip to main content

ntop

Python PyPI License

ntop is an interactive Huawei Ascend NPU and NVIDIA GPU process monitor for the terminal. It adds a native DCMI backend for Ascend devices while retaining the mature NVML monitoring experience inherited from nvitop.

The name means NPU top. The command automatically selects Ascend when DCMI reports at least one NPU and otherwise falls back to NVIDIA/NVML.

Features

  • Monitor Ascend NPU HBM usage, AICore utilization, temperature, power, clocks, PCIe address, and device processes through libdcmi.so.
  • Monitor NVIDIA GPUs through NVML, including the features provided by the upstream nvitop codebase.
  • Use an interactive curses interface with full, compact, and automatic layouts.
  • Sort and filter processes, inspect process metrics and environments, use tree view, and send signals from the TUI.
  • Print a colorized one-shot status report for scripts and SSH sessions.
  • Inspect backend and system diagnostics with ntop env.
  • Choose a backend explicitly when both drivers are installed.

Installation

ntop requires Python 3.8 or newer.

python -m pip install --upgrade ntop

An isolated command-line installation is also supported:

pipx install ntop
# or run without a persistent installation
uvx ntop

To install the current checkout for development:

git clone https://github.com/Byter-s/ntop.git
cd ntop
python -m pip install -e .

The Python dependencies are intentionally broad: psutil>=5.6.6 and nvidia-ml-py>=11.450.51, with no upper bounds. nvidia-ml-py is a pure-Python binding and can be installed on Ascend-only hosts; an NVIDIA driver is not required unless the NVIDIA backend is used.

Hardware backends

Backend Runtime requirement Notes
Ascend Huawei Ascend driver and libdcmi.so Linux only; selected first in auto mode when an NPU is reported
NVIDIA NVIDIA driver with NVML Used when Ascend is unavailable or --backend nvidia is given

On Linux, curses is part of Python. On Windows, windows-curses and colorama are installed automatically. The Ascend backend itself is Linux-only.

Quick start

Interactive monitor:

ntop
ntop --backend ascend
ntop --backend nvidia -m full
ntop -m compact --interval 1

One-shot report:

ntop -1
ntop -1 -o 0 1
ntop -1 --only-visible

Environment and driver diagnostics:

ntop env
ntop --backend ascend env

If another program named ntop is earlier on your PATH, the equivalent module entry point is always available:

python -m ntop

Common options

--backend {auto,ascend,nvidia}  Choose the device backend (default: auto)
-1, --once                     Print one report and exit
-m, --monitor [MODE]           Monitor continuously (auto, full, or compact)
--interval SEC                 Refresh interval
-o, --only INDEX [...]         Show only selected physical device indices
-ov, --only-visible            Respect the selected backend's visibility variable
-u, --user [USERNAME ...]      Filter by user; no username means current user
-p, --pid PID [...]            Filter by PID
-c, --compute                  Show compute processes
-U, --ascii                    Use ASCII characters only
--colorful                     Enable 256-color bar charts
--light                        Adjust colors for a light terminal
--profile [FILE]               Write refresh timings to CSV

Run ntop --help for the complete and authoritative option list.

Backend selection and environment variables

Variable Description Default
NTOP_BACKEND auto, ascend, or nvidia auto
NTOP_DCMI_LIBRARY Explicit path or loader name for libdcmi.so auto-discovered
NTOP_MONITOR_MODE Comma-separated mode/theme settings such as full,colorful,dark auto,plain,dark
NTOP_GPU_UTILIZATION_THRESHOLDS Utilization color thresholds, for example 10,75 10,75
NTOP_MEMORY_UTILIZATION_THRESHOLDS Memory color thresholds, for example 10,80 10,80
NPU_VISIBLE_DEVICES Visible Ascend logical indices all
ASCEND_VISIBLE_DEVICES Fallback Ascend visibility variable all
CUDA_VISIBLE_DEVICES Visible NVIDIA devices all

For compatibility with inherited configurations, the legacy NVITOP_MONITOR_MODE, NVITOP_GPU_UTILIZATION_THRESHOLDS, and NVITOP_MEMORY_UTILIZATION_THRESHOLDS variables are also accepted when the corresponding NTOP_* variable is unset.

DCMI discovery checks NTOP_DCMI_LIBRARY, the system dynamic linker, and these common paths:

/usr/local/Ascend/driver/lib64/driver/libdcmi.so
/usr/local/Ascend/driver/lib64/common/libdcmi.so
/usr/local/dcmi/lib64/libdcmi.so

Keybindings

Key Action
q Quit or return
h / ? Open help
a / f / c Switch to auto / full / compact mode
r / Ctrl-R / F5 Refresh
Arrow keys / mouse wheel Select a process
Space Tag or untag a process
Ctrl-C / I, T, K Interrupt, terminate, or kill selected processes
e Show the selected process environment
t Toggle process tree view
Enter Open process metrics
, / . Select the sort column
/ Reverse sort order

Python API

The NVIDIA-compatible API remains available, with explicit Ascend classes added:

from ntop import AscendDevice, Device

# Ascend
ascend_devices = AscendDevice.all()

# NVIDIA
nvidia_devices = Device.all()

The command-line backend selection does not change what Device means in Python: Device is the upstream NVIDIA/NVML class, while AscendDevice is the DCMI class.

Ascend notes

  • DCMI support varies across driver and firmware releases. Metrics that the installed DCMI does not expose are displayed as N/A rather than guessed.
  • Per-process HBM usage is available. Per-process AICore/HBM-bandwidth utilization may remain N/A because the DCMI resource API does not provide it.
  • In containers, mount the Ascend driver libraries and device nodes as required by your runtime. ntop env is the fastest way to diagnose discovery failures.

License

This is a derivative of nvitop and preserves its dual-license layout:

  • API code: Apache License 2.0 — see LICENSE.
  • CLI and TUI code: GNU GPL version 3 — see COPYING.

The distribution license expression is Apache-2.0 AND GPL-3.0-only. Original copyright and license notices are retained in derived source files.

Acknowledgements

ntop is built from nvitop by Xuehai Pan. Its NVML API wrappers, host process monitoring, and curses interface form the foundation of this project. Thanks to the upstream authors and contributors for their work.

Metadata

Release files for ntop 0.1.0

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

Source distribution (sdist)

Source distribution for ntop 0.1.0
File Size Uploaded
ntop-0.1.0.tar.gz 186.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ntop 0.1.0
File Interpreter ABI Platform
ntop-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 400.6 kB

Release files / ntop-0.1.0.tar.gz

Download URL ntop-0.1.0.tar.gz
Size 186.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8bc8202c408ee17398f0ad67a01a181db55c15b0d2b97fed577cbb1ec41ceb18
BLAKE2b-256 checksum
How to use checksums
fde7c4a94334054557f08487ff338e2d10c1a630c7cd9aa6f2731ef5508d69bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release files / ntop-0.1.0-py3-none-any.whl

Download URL ntop-0.1.0-py3-none-any.whl
Size 214.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
905152609c533bcf9a2e6f9bf40b0d4310f1a7c2145f3802baa066fecc104618
BLAKE2b-256 checksum
How to use checksums
bf9a9cc4e4082dd70ccded1e166b64b03688686d8b46e0216680cd4b02fe84cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

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