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 driver), NVIDIA (Linux proprietary divers), Qualcomm Adreno (Linux MSM driver).
Because a picture is worth a thousand words:
- NVTOP Options and Interactive Commands
- GPU Support
- Build
- Distribution Specific Installation Process
- NVTOP Build
- Troubleshoot
- License
NVTOP has a builtin setup utility that provides a way to specialize the interface to your needs.
Simply pressF2
and select the options that are the best for you.
You can save the preferences set in the setup window by pressingF12
.
The preferences will be loaded the next time you runnvtop
.
NVTOP comes with a manpage!
man nvtop
For quick command line arguments help
nvtop -h
nvtop --help
NVTOP supports AMD GPUs using theamdgpu
driver through the exposed DRM and
sysfs interface.
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.
NVTOP supports Intel GPUs using thei915
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 SUPPORT STATUS
- Intel is working on exposing more hardware information through an
HWMON
interface. The patches are still a work in progress:see patch series. - The fdinfo interface does not expose the memory allocated by the process. The field in the process list is therefore empty.
TheNVML librarydoes 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 theNVML documentation.
NVTOP supports Adreno GPUs using themsm
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.
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
- Apple support is still being worked on. Some bugs and limitations may apply.
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.
Several libraries are required in order for NVTOP to display GPU info:
- Thencurseslibrary driving the user interface.
- This makes the screen look beautiful.
- For NVIDIA: theNVIDIA Management Library(NVML) which comes with the GPU driver.
- This queries the GPU for info.
- For AMD: the libdrm library used to query AMD GPUs through the kernel driver.
If your distribution provides the snap utility, follow thesnap installation processto obtain an up-to-date version ofnvtop
.
A standalone application is available asAppImage.
-
sudo apt install nvtop
APPA supporting Ubuntu 20.04, 22.04 and neweris provided by
Martin Wimpressthat offers an up-to-date
version ofnvtop
,enabled for NVIDIA, AMD and Intel.
sudo add-apt-repository ppa:flexiondotorg/nvtop
sudo apt install nvtop
-
AMD and Intel Dependencies
sudo apt install libdrm-dev libsystemd-dev #Ubuntu 18.04 sudo apt install libudev-dev
-
NVIDIA Depenency
- NVIDIA drivers (seeUbuntu WikiorUbuntu PPAorDebian Wiki)
-
NVTOP Dependencies
-
CMake, ncurses and Git
sudo apt install cmake libncurses5-dev libncursesw5-dev git
- NVTOP
- Follow theNVTOP Build
A standalone application is available asAppImage.
-
sudo dnf install nvtop
-
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %{rhel}).noarch.rpm sudo dnf install nvtop
-
sudo dnf install -y epel-release sudo dnf install nvtop
-
AMD and Intel Dependencies
sudo dnf install libdrm-devel systemd-devel
-
NVIDIA Depenency
- NVIDIA drivers,CUDA required for nvml libraries(seeRPM Fusion)
-
NVTOP Dependencies
-
CMake, ncurses, C++ and Git
sudo dnf install cmake ncurses-devel git gcc-c++
- NVTOP
- Follow theNVTOP Build
A standalone application is available as anAppImage.
Build process for OpenSUSE:
-
AMD Dependecy
sudo zypper install libdrm-devel
-
NVIDIA Depenency
- NVIDIA drivers (seeSUSE Support Database)
-
NVTOP Dependencies
- CMake, ncurses and Git
sudo zypper install cmake ncurses-devel git
- CMake, ncurses and Git
-
NVTOP
- Follow theNVTOP Build
-
sudo pacman -S nvtop
-
sudo layman -a guru&&sudo emerge -av nvtop
An AppImage is a standalone application. Just download the AppImage, make it executable and run it!
-
Go to therelease pageand download
nvtop-x86_64.AppImage
-
#Go to the download location ** The path may differ on your system ** cd$HOME/Downloads #Make the AppImage executable chmod u+x nvtop-x86_64.AppImage #Enjoy nvtop ./nvtop-x86_64.AppImage
If you are curious how that works, please visit theAppImage website.
-
snap install nvtop #Add the capability to kill processes inside nvtop snap connect nvtop:process-control #Add the capability to inspect GPU information (fan, PCIe, power, etc) snap connect nvtop:hardware-observe #AMDGPU process list support (read /proc/<pid>) snap connect nvtop:system-observe #Temporary workaround to get per-process GPU usage (read /proc/<pid>/fdinfo) snap connect nvtop:kubernetes-support
Notice: The connect commands allow
-
NVIDIA drivers (same as above)
-
git clone https://github /Syllo/nvtop.git&&cdnvtop sudo docker build --tag nvtop. sudo docker run -it --rm --runtime=nvidia --gpus=all --pid=host nvtop
git clone https://github /Syllo/nvtop.git
mkdir -p nvtop/build&&cdnvtop/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
#make DESTDIR= "/your/install/path" install
If you usecondaas environment manager and encounter an error while building NVTOP, tryconda deactivate
before invokingcmake
.
The build system supports multiple build types (e.g. -DCMAKE_BUILD_TYPE=RelWithDebInfo):
- Release: Binary without debug info
- RelWithDebInfo: Binary with debug info
- Debug: Compile with warning flags and address/undefined sanitizers enabled (for development purposes)
- The plot looks bad:
- Verify that you installed the wide character version of the ncurses library (libncursesw5-dev for Debian / Ubuntu), clean the build directory and restart the build process.
- Putty:Tell putty not to lie about its capabilities (
$TERM
) by setting the fieldTerminal-type string
toputty
in the menuConnection > Data > Terminal Details
.
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 <gnu.org/licenses/>.