

nvtop - Awesome Linux task monitor for NVIDIA, AMD & Intel GPUs - nixCraft
source link: https://www.cyberciti.biz/hardware/nvtop-command-in-linux-to-monitor-nvidia-amd-intel-gpus/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Awesome Linux task monitor for NVIDIA, AMD & Intel GPUs
The nvtop command is an excellent task monitor for Linux users for NVIDIA, AMD and Intel GPUs (Graphics Processing Units). It is just like your top command or htop command and efficiently handles multiple GPUs in your system and shows details about them in a htop format. Let us see how to install the nvtop command on your Linux distro and monitor GPU tasks.
- nixCraft is a one-person operation. I create all the content myself, with no help from AI or ML. I keep the content accurate and up-to-date.
- Your privacy is my top priority. I don’t track you, show you ads, or spam you with emails. Just pure content in the true spirit of Linux and FLOSS.
- Fast and clean browsing experience. nixCraft is designed to be fast and easy to use. You won’t have to deal with pop-ups, ads, cookie banners, or other distractions.
- Support independent content creators. nixCraft is a labor of love, and it’s only possible thanks to the support of our readers. If you enjoy the content, please support us on Patreon or share this page on social media or your blog. Every bit helps.
nvtop command – Awesome Linux task monitor for NVIDIA, AMD & Intel GPUs
The nvtop command is a ncurses-based (new curses lib that displays info in terminals) GPU status viewer for AMD, Intel and NVIDIA GPUs. In other words, you can use this interactive GPU process viewer for the following GPUs on Linux:
- AMD GPUs using the amdgpu driver.
- Intel graphic card using the i915 Linux driver.
- Nvidia GPUs using NVIDIA driver and anything starting at GeForce 600, GeForce 800M and successor should work fine.
- Adreno GPU by Qualcomm
Installing the nvtop command on Linux
You can also install the nvtop command as per your Linux distro on your desktop or GPU computer server.
Arch Linux
Run the pacman command as follows:$ sudo pacman -Syu nvtop
Gentoo Linux
Use the following emerge command:vivek@gentoo:~$ sudo layman -a guru
vivek@gentoo:~$ sudo emerge -av nvtop
Ubuntu Impish (21.10), Debian buster (stable) and more recent
Try the apt command/apt-get command:$ sudo apt update
$ sudo apt install nvtop
Debian Linux 10+ user please enable contrib repo in the /etc/apt/sources.list:
deb http://deb.debian.org/debian buster main non-free contrib deb http://deb.debian.org/debian buster-updates main non-free contrib deb http://deb.debian.org/debian-security/ buster/updates main non-free contrib
Then search with the apt-cache command and install it using the sudo apt install nvtop:$ sudo apt update
$ sudo apt search nvtop
$ sudo apt-cache policy nvtop
nvtop: Installed: (none) Candidate: 1.0.0-1 Version table: 1.0.0-1 500 500 http://deb.debian.org/debian buster/contrib amd64 Packages
Fedora Linux version 36+
Try the dnf command:$ sudo dnf install nvtop
CetOS Stream, RHEL, Rocky, and AlmaLinux version 8/9
Enable EPEL repo and install the nvtop:## RHEL 8/9 ##
$ sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %{rhel}).noarch.rpm
$ sudo dnf install nvtop
## CentOS Stream, Rocky Linux, AlmaLinux ##
$ sudo dnf install -y epel-release
$ sudo dnf install nvtop
All other Linux distro
Try the snap command. For example:$ snap search nvtop
$ sudo snap install nvtop
Next, add the capability to kill GPU processes inside nvtop:$ sudo snap connect nvtop:process-control
You can also add the capability to inspect GPU info (Fan, PCIe, Power, etc) easily as follows:$ sudo snap connect nvtop:hardware-observe
Here is how to add AMDGPU process list support:$ sudo snap connect nvtop:system-observe
You may need temporary workaround to get per-process GPU usage. For example:$ sudo snap connect nvtop:kubernetes-support
How to use Docker nvtop image
Try the following command at the Linux terminal. You must have working Docker installation. For example:$ 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
Getting started with the nvtop
Now that tool is installed, it is time to get your hands dirty. All you have to do is type the following command:$ nvtop
You can also state the delay between updates in tenths of seconds. For example:$ nvtop -d 0.25
Do you want monochrome mode? Here is how to disable colour output:$ nvtop -C
Here is how to display only one bar plot corresponding to the maximum of all GPUs:$ nvtop -p
nvtop command keyboard shortcuts
Shortcut | Description |
---|---|
Up | Select (highlight) the previous process. |
Down | Select (highlight) the next process. |
Left / Right | Scroll in the process row. |
+ | Sort increasingly. |
- | Sort decreasingly. |
F2 | Enter the setup utility to modify the interface options. |
F12 | Save the current interface options to persistent storage. |
F9 | “Kill” process: Select a signal to send to the highlighted process. |
F6 | Sort: Select the field for sorting. The current sort field is highlighted inside the header bar. |
F10, q, Esc | Quit nvtop command. |
Summing up
I found nvtop very useful when I need to see what is stressing out my GPU and other critical info like GPU temperature or fan speed. You can quickly kill the process with this tool that is eating all your GPU without using the combination of ps command/grep command or egrep command and then kill the PID. Most modern apps like Firefox, Chrome and your code written in Python can use dedicated NVIDIA or AMD GPU. Hence, having this little tool is useful. Give it a try.
Getting help about the nvtop
You can read the nvtop manual page offline or online at the project repo. For example, try the man command or pass the -h option as follows:$ man nvtop
$ nvtop -h
See also
Did you notice? 🧐
nixCraft is ad-free to protect your privacy and security. We rely on reader support to keep the site running. Please consider subscribing to us on Patreon or supporting us with a one-time support through PayPal or purchase official merchandise. Your support will help us cover the costs of hosting, CDN, DNS, and tutorial creation.Recommend
-
104
“the new Mission: Impossible is coming @MasteringVim @nixcraft”
-
81
NVTOP What is NVTOP? Nvtop stands for NVidia TOP, a (h)top like task monitor for NVIDIA GPUs. It can handle multiple GPUs and print information about them in a htop familiar way. Because a p...
-
8
How to change LUKS disk encryption passphrase in Linux Author: Vivek Gite Last updated: December 29, 2020
-
15
Top 6 awesome text editors for Linux and Unix command-line users/developers Author: Vivek Gite Last updated: December 30, 2020
-
8
duf – Disk Usage/Free Utility for Linux, BSD, macOS & Windows Author: Vivek Gite Last updated: January 16, 2021
-
6
Typically we use the lscpu command or /proc/cpuinfo command on Linux to check CPU information. I recently found another simplistic yet fancier...
-
12
FreeBSD bhyve, OpenSSL, GEOM/libfetch security fix releasedAll supported versions of FreeBSD are affected by various security bugs that need to be applied ASAP. For example, a memory corruption bug exists in the bhyve hypervisor. Another over...
-
12
How to turn off login banner in Linux/Unix with .hushlogin 🐧 nixCraft → Howto → Turning o...
-
4
Abhinav Upadhyay is an Indian software developer, the NetBSD project contributor, and works with the exciting field of machine learning (ML). Recently I did a quick Q and A with Abhinav about his life-changing journey with NetBSD, getting sta...
-
12
Most of us use love and use the jq command. It works on Linux or Unix-like systems to extract data from JSON documents. Recently I found htmlq, which is like jq and written in Rust lang. Imagine being able to sed or grep for HTML data. We can...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK