nvtop
nvtop copied to clipboard
GPU & Accelerator process monitoring for AMD, Apple, Huawei, Intel, NVIDIA and Qualcomm
NVTOP
What is NVTOP?
Nvtop stands for Neat Videocard TOP, a (h)top like task monitor for AMD and NVIDIA GPUs. It can handle multiple GPUs and print information about them in a htop familiar way.
Because a picture is worth a thousand words:
Table of Contents
-
NVTOP Options and Interactive Commands
- Interactive Setup Window
- Saving Preferences
- NVTOP Manual and Command line Options
-
GPU Support
- AMD
- NVIDIA
- Build
-
Distribution Specific Installation Process
-
Ubuntu / Debian
- Ubuntu disco (19.04) / Debian buster (stable)
- Fedora / RedHat / CentOS
- OpenSUSE
- Arch Linux
- Docker
-
Ubuntu / Debian
- NVTOP Build
- Troubleshoot
- License
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.
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 through the exposed DRM and sysfs interfaces.
Support for recent GPUs are regularly mainlined into the linux kernel, so please use a recent-enough kernel for your GPU.
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.
Build
Several libraries are required in order for NVTOP to display GPU information:
- The ncurses library driving the user interface.
- This makes the screen look beautiful.
- For NVIDIA: the NVIDIA Management Library (NVML) which comes with the GPU driver.
- This queries the GPU for information.
- For AMD: the libdrm library used to query AMD GPUs through the kernel driver.
Distribution Specific Installation Process
Ubuntu / Debian
Ubuntu impish (21.10) / Debian buster (stable) and more recent
-
sudo apt install nvtop
Older
-
AMD Dependecy
sudo apt install libdrm-dev
-
NVIDIA Depenency
- NVIDIA drivers (see Ubuntu Wiki or Ubuntu PPA or Debian Wiki)
-
NVTOP Dependencies
-
CMake, ncurses and git
sudo apt install cmake libncurses5-dev libncursesw5-dev git
- NVTOP
- Follow the NVTOP Build
Fedora / RedHat / CentOS
-
AMD Dependecy
sudo dnf install libdrm-devel
-
NVIDIA Depenency
- NVIDIA drivers, CUDA required for nvml libraries (see RPM Fusion)
-
NVTOP Dependencies
-
CMake, ncurses, c++ and git
sudo dnf install cmake ncurses-devel git gcc-c++
- NVTOP
- Follow the NVTOP Build
OpenSUSE
-
AMD Dependecy
sudo zypper install libdrm-devel
-
NVIDIA Depenency
- NVIDIA drivers (see SUSE Support Database)
-
NVTOP Dependencies
- CMake, ncurses and git
sudo zypper install cmake ncurses-devel git
- CMake, ncurses and git
-
NVTOP
- Follow the NVTOP Build
Arch Linux
-
sudo pacman -S nvtop
Gentoo
-
sudo layman -a guru && sudo emerge -av nvtop
Docker
-
NVIDIA drivers (same as above)
-
git clone https://github.com/Syllo/nvtop.git && cd nvtop sudo docker build --tag nvtop . sudo docker run -it --rm --runtime=nvidia --gpus=all --pid=host nvtop
NVTOP Build
git clone https://github.com/Syllo/nvtop.git
mkdir -p nvtop/build && cd nvtop/build
cmake .. -DNVIDIA_SUPPORT=ON -DAMDGPU_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 use conda as environment manager and encounter an error while building nvtop, try conda deactivate
before invoking cmake
.
The build system supports multiple build type (e.g. -DCMAKE_BUILD_TYPE=RelWithDebInfo):
- Release: Binary without debug information
- RelWithDebInfo: Binary with debug information
- Debug: Compile with warning flags and address/undefined sanitizers enabled (for development purposes)
Troubleshoot
- 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
.
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/>.