nvtop README

The project's README from github.com/Syllo/nvtop. As one markdown file: README.md.

NVTOP

What is NVTOP?

NVTOP stands for Neat Videocard TOP, a (h)top like task monitor for GPUs and accelerators. It can handle multiple GPUs and print information about them in a htop-familiar way.

Currently supported vendors are AMD (Linux amdgpu driver), Apple (limited M1 & M2 support), Huawei (Ascend), Intel (Linux i915/Xe drivers), NVIDIA (Linux proprietary divers), Qualcomm Adreno (Linux MSM driver), Broadcom VideoCore (Linux v3d driver), Rockchip, MetaX (MXSML driver), Enflame (Linux EFML driver), Tenstorrent (Linux tt-kmd driver). Rockchip, MetaX (MXSML driver), Enflame (Linux EFML driver), Iluvatar CoreX (ixML / libixml).

Because a picture is worth a thousand words:

NVTOP interface

Table of Contents

NVTOP Options and Interactive Commands

Interactive Setup Window

NVTOP has a builtin setup utility that provides a way to specialize the interface to your needs. Simply press F2 and select the options that are the best for you.

In the Chart section you can choose which metrics are plotted, including GPU and memory utilization, temperature, power, clocks, and the PCIe RX / TX load (the receive and transmit throughput as a percentage of the maximum link bandwidth).

NVTOP Setup Window

Saving Preferences

You can save the preferences set in the setup window by pressing F12. The preferences will be loaded the next time you run nvtop.

NVTOP Manual and Command line Options

NVTOP comes with a manpage!

man nvtop

For quick command line arguments help

nvtop -h
nvtop --help

GPU Support

AMD

NVTOP supports AMD GPUs using the amdgpu driver and the legacy radeon driver (legacy GPUs, limited support) through the exposed DRM and sysfs interface.

The radeon provides limited metrics compared to amdgpu.

AMD introduced the fdinfo interface in kernel 5.14 (browse kernel source). Hence, you will need a kernel with a version greater or equal to 5.14 to see the processes using AMD GPUs.

Support for recent GPUs are regularly mainlined into the linux kernel, so please use a recent-enough kernel for your GPU.

Intel

NVTOP supports Intel GPUs using the i915 or xe linux driver.

Intel introduced the fdinfo interface in kernel 5.19 (browse kernel source). Hence, you will need a kernel with a version greater or equal to 5.19 to see the processes using Intel GPUs.

Intel requires CAP_PERFMON or CAP_SYS_ADMIN capabilities to access the total memory usage, you can run sudo setcap cap_perfmon=ep nvtop to grant the necessary permissions or run nvtop as root.

NVIDIA

The NVML library does not support some of the queries for GPUs coming before the Kepler microarchitecture. Anything starting at GeForce 600, GeForce 800M and successor should work fine. For more information about supported GPUs please take a look at the NVML documentation.

Adreno

NVTOP supports Adreno GPUs using the msm linux driver.

msm introduced the fdinfo interface in kernel 6.0 (browse kernel source). Hence, you will need a kernel with a version greater or equal to 6.0 to see the processes using Adreno GPUs.

Apple

NVTOP includes some initial support for Apple using Metal. This is only supported when building for Apple, and when building for Apple only this vendor is supported.

APPLE SUPPORT STATUS

Ascend

NVTOP supports Ascend (testing on Altas 800 (910B)) by DCMI API (version 6.0.0).

Currently, the DCMI only supports limited APIs, missing PCIe generation, tx/rx throughput info, max power draw etc.

Iluvatar CoreX

NVTOP supports Iluvatar CoreX GPUs through the ixML library.

The backend dynamically loads libixml.so from /usr/local/corex/lib, /usr/local/corex/lib64, or the default dynamic loader search path. The ixML runtime exposes an NVML-compatible API surface used by NVTOP to query device, power, PCIe, clock, temperature, memory, and process information.

VideoCore

NVTOP supports VideoCore (testing on raspberrypi 4B).

Supports GPU frequency, temperature, utilization, per-process utilization, GPU memory usage, and H264 decoding utilization.

On non-raspberry pi os, you need to use the linux-rpi 6.12.y kernel and above, and ensure the presence of the /dev/vcio device.

Rockchip

NVTOP supports Rockchip (testing on orangepi 5 plus).

Supports NPU frequency, temperature, utilization.

MetaX

NVTOP supports MetaX (testing on MXC500) by MXSML LIBRARY.

For more information about GPUs please take a look at the METAX documentation

Enflame

NVTOP supports Enflame GCUs (testing on Enflame S60, Enflame L300 and Enflame L600) by EFML LIBRARY

GCU, which refers to General Compute Unit, is a type of accelerator card that is used to perform general-purpose computing tasks just like GPGPU.

Tenstorrent

NVTOP supports Tenstorrent AI accelerators (Blackhole, Wormhole, Grayskull) through the tt-kmd kernel driver.

Supports temperature, power draw, AI clock, fan RPM, PCIe link info, and process listing. No external libraries required -- all data is read from sysfs, hwmon, and procfs.

Build

Several libraries are required in order for NVTOP to display GPU info:

Distribution Specific Installation Process

Ubuntu / Debian

If your distribution provides the snap utility, follow the snap installation process to obtain an up-to-date version of nvtop.

A standalone application is available as AppImage.

Ubuntu Focal (20.04), Debian buster (stable) and more recent

sudo apt install nvtop

Ubuntu PPA

A PPA supporting Ubuntu 20.04 and newer is provided by Quentin Lienhardt that offers an up-to-date version of nvtop, enabled for NVIDIA, AMD and Intel.

sudo add-apt-repository ppa:quentiumyt/nvtop
sudo apt install nvtop

Older

Fedora / Red Hat / CentOS

A standalone application is available as AppImage.

Fedora 36 and newer

Red Hat Enterprise Linux 8 and 9

CentOS Stream, Rocky Linux, AlmaLinux

Build process for Fedora / Red Hat / CentOS:

OpenSUSE

A standalone application is available as an AppImage.

Build process for OpenSUSE:

Arch Linux

Gentoo

AppImage

An AppImage is a standalone application. Just download the AppImage, make it executable and run it!

If you are curious how that works, please visit the AppImage website.

Snap

Notice: The connect commands allow

Conda-forge

A conda-forge feedstock for nvtop is available.

conda / mamba / miniforge

conda install --channel conda-forge nvtop

pixi

pixi global install nvtop

Docker

WSL2

Nvtop support in WSL2 mostly boils down to GPU/Accelerator vendor support of WSL2. Nvtop should work out of the box for the following configurations:

NVTOP Build

git clone https://github.com/Syllo/nvtop.git
mkdir -p nvtop/build && cd nvtop/build
cmake .. -DNVIDIA_SUPPORT=ON -DAMDGPU_SUPPORT=ON -DINTEL_SUPPORT=ON
make

# Install globally on the system
sudo make install

# Alternatively, install without privileges at a location of your choosing
# cmake .. -DNVIDIA_SUPPORT=ON -DAMDGPU_SUPPORT=ON -DINTEL_SUPPORT=ON -DCMAKE_INSTALL_PREFIX=/path/to/your/dir
# make
# make install

If you use conda as environment manager and encounter an error while building NVTOP, try conda deactivate before invoking cmake.

The build system supports multiple build types (e.g. -DCMAKE_BUILD_TYPE=RelWithDebInfo):

Troubleshoot

License

NVTOP is licensed under the GPLv3 license or any later version. You will find a copy of the license inside the COPYING file of the repository or at the GNU website <www.gnu.org/licenses/>.

nvtop (Syllo/nvtop)

Searching Database…

11.1K ·GitHub
Что это такое?NVTOP (Neat Videocard TOP) — это монитор задач для видеокарт и ускорителей в духе htop: работает в терминале, умеет работать с несколькими GPU сразу и показывает, чем занято каждое устройство, включая то, какие процессы его используют.
Это программа с графическим интерфейсом или консольная утилита?Консольная утилита: она рисует интерфейс в стиле htop с помощью ncurses, есть интерактивное окно настроек (F2), а для параметров командной строки прилагается man-страница.
Что ещё нужно, кроме самой программы?Драйвер производителя вашей видеокарты — nvtop читает устройства через библиотеки управления, которые идут в комплекте с драйверами (NVML для NVIDIA, libdrm для AMD), а для интерфейса нужна ncurses. Для сборки из исходников также понадобятся CMake и Git.
Есть ли подводные камни с ядрами или правами доступа?Статистика по отдельным процессам требует свежего ядра: 5.14+ для AMD, 5.19+ для Intel, 6.0+ для Adreno. На Intel для общего объёма занятой памяти нужен CAP_PERFMON (setcap или запуск от root). Поддержка NVIDIA начинается с Kepler (GeForce 600).
Какие видеокарты и ускорители он умеет мониторить?AMD (amdgpu и устаревший radeon), Intel (i915/Xe), NVIDIA (GeForce 600+), Qualcomm Adreno, Huawei Ascend, Apple M1/M2, Broadcom VideoCore, NPU Rockchip, а также ускорители MetaX, Enflame, Tenstorrent и Iluvatar CoreX.
Какую статистику он показывает для каждой видеокарты?Загрузку, использование памяти, температуру, энергопотребление, частоты и пропускную способность PCIe RX/TX, плюс список процессов, которые сейчас используют GPU. Какие из этих графиков отображать, вы выбираете в настройках диаграмм.
Можно ли настроить отображение под себя?Да — нажмите F2, чтобы открыть встроенное окно настроек, и выберите, какие метрики и разделы показывать; затем F12 сохранит эти предпочтения, и при следующем запуске они загрузятся снова.
Работает ли он на Mac с Apple Silicon?Есть начальная поддержка M1 и M2 через Metal, но работа ещё не завершена, и возможны баги. Сборка для Apple поддерживает только GPU Apple; для остальных производителей нужна сборка под Linux.
Можно ли запустить его внутри WSL2?Да, если производитель GPU поддерживает WSL2 — с NVIDIA всё работает сразу, когда Windows отдаёт драйвер. Не устанавливайте Linux-драйверы NVIDIA внутри WSL2, иначе может возникнуть несовпадение версий, и nvtop может молча не заработать.
What are similar projects?btop, g-helper, goaccess, lsoff, bottom, nvitop, nnn, bpytop
Creator
Syllo
Size
1.3 MB
Stars
11.1K
Age
9y
Commits · 90 Days