nvtop – A great Linux task monitor
nvtop command is a great task monitor for Linux users that monitors NVIDIA, AMD and Intel GPU (graphics processing unit) usage. It is similar to the top command or htop command and can efficiently handle multiple GPUs in your system and display detailed information about them in htop format.
Next let’s take a look at how to install the nvtop command and monitor GPU tasks on your Linux distribution.
nvtop Command – A great Linux task monitor for NVIDIA, AMD and Intel GPUs
The nvtop command is a GPU status viewer based on ncurses (the new curses library that displays information in the terminal) for AMD, Intel and NVIDIA GPUs. In other words, you can use this interactive GPU process viewer on Linux to view the status of the following GPUs:
- AMD GPU using amdgpu driver.
- Intel graphics card using i915 Linux driver.
- Use NVIDIA drivers with NVIDIA GPUs GeForce 600, GeForce 800M, and their successors.
Installing nvtop command on Linux
You can also install the nvtop command on the GPU desktop or server depending on your Linux distribution.
Arch Linux
Run the following pacman command:
$ sudo pacman -Syu nvtop
Gentoo Linux
Use the following emerge command:
linuxmi@linuxmi:~/www.linuxmi.com$ sudo layman -a guru linuxmi@linuxmi:~/www.linuxmi.com$ sudo emerge -av nvtop
Ubuntu Impish (21.10), Debian Buster (stable) and newer versions
Try using apt command or apt-get command:
linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt update linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install nvtop

Debian Linux 10 users please enable contrib software sources in /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 for it using apt-cache command and install it using sudo apt install nvtop command:
linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt update linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt search nvtop linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt-cache policy nvtop
All other Linux distributions
Try using the snap command. For example:
linuxmi@linuxmi:~/www.linuxmi.com$ snap search nvtop linuxmi@linuxmi:~/www.linuxmi.com$ sudo snap install nvtop
Next, add the function to kill GPU processes in nvtop:
linuxmi@linuxmi:~/www.linuxmi.com$ sudo snap connect nvtop:process-control
You can also easily add the ability to view GPU information (fans, PCIe, power supplies, etc.) as follows:
linuxmi@linuxmi:~/www.linuxmi.com$ sudo snap connect nvtop:hardware-observe
Here's how to add AMD GPU process list support:
linuxmi@linuxmi:~/www.linuxmi.com$sudo snap connect nvtop:system-observe
You may need a workaround to get per-process GPU usage. For example:
linuxmi@linuxmi:~/www.linuxmi.com$ sudo snap connect nvtop:kubernetes-support
How to use Docker nvtop image
Please try the following commands in a Linux terminal. You must have a working Docker installation. For example:
linuxmi@linuxmi:~/www.linuxmi.com$git clone https://github.com/Syllo/nvtop.git linuxmi@linuxmi:~/www.linuxmi.com$cd nvtop linuxmi@linuxmi:~/www.linuxmi.com/nvtop$ sudo docker build --tag nvtop . linuxmi@linuxmi:~/www.linuxmi.com/nvtop$ sudo docker run -it --rm --runtime=nvidia --gpus=all --pid=host nvtop
Getting started with nvtop
Now that the tool is installed, it’s time to try it out. You just need to enter the following command:
linuxmi@linuxmi:~/www.linuxmi.com$ nvtop

You can also specify the delay between updates in tenths of a second. For example:
linuxmi@linuxmi:~/www.linuxmi.com$nvtop -d 0.25

Do you want monochrome mode? Here's how to disable colored output:
linuxmi@linuxmi:~/www.linuxmi.com$ nvtop -C

Here's how to display only one bar, corresponding to the maximum value across all GPUs:
linuxmi@linuxmi:~/www.linuxmi.com$ nvtop -p
Keyboard shortcuts for the nvtop command
shortcut key | illustrate |
---|---|
Up |
Select (highlight) the previous process. |
Down |
Select (highlight) the previous process. |
Left / Right |
Scroll in process line |
|
Sort in ascending order, that is, sort from small to large. |
- |
Sort in descending order, that is, from large to small. |
F2 |
Enter the setting tool to modify the interface options. |
F12 |
Save the current interface options to persistent storage. |
F9 |
"Kill" process: Select the signal to be sent to the highlighted process. |
F6 |
Sort: Select the field to sort. The current sort field will be highlighted in the title bar. |
F10 , q , Esc |
Exit the nvtop command. |
Show details
in conclusion:
I find nvtop very useful when I need to see what is stress testing my GPU and key information like GPU temperature or fan speed. You can use this tool to quickly kill a process that is using up all GPU resources without having to use the ps command/grep command and then kill the PID. Most modern applications such as Firefox, Chrome, and code written in Python can use dedicated NVIDIA or AMD GPUs. Therefore, it is very useful to have this gadget. Might as well give it a try.
Get help with nvtop
You can read the nvtop manual page in the project repository offline or online. For example, try using the man command or passing the -h option like this:
nvtop -h
The above is the detailed content of nvtop – A great Linux task monitor. For more information, please follow other related articles on the PHP Chinese website!

The differences between Linux and Windows in handling device drivers are mainly reflected in the flexibility of driver management and the development environment. 1. Linux adopts a modular design, and the driver can be loaded and uninstalled dynamically. Developers need to have an in-depth understanding of the kernel mechanism. 2. Windows relies on the Microsoft ecosystem, and the driver needs to be developed through WDK and signed and certified. The development is relatively complex but ensures the stability and security of the system.

The security models of Linux and Windows each have their own advantages. Linux provides flexibility and customizability, enabling security through user permissions, file system permissions, and SELinux/AppArmor. Windows focuses on user-friendliness and relies on WindowsDefender, UAC, firewall and BitLocker to ensure security.

Linux and Windows differ in hardware compatibility: Windows has extensive driver support, and Linux depends on the community and vendors. To solve Linux compatibility problems, you can manually compile drivers, such as cloning RTL8188EU driver repository, compiling and installing; Windows users need to manage drivers to optimize performance.

The main differences between Linux and Windows in virtualization support are: 1) Linux provides KVM and Xen, with outstanding performance and flexibility, suitable for high customization environments; 2) Windows supports virtualization through Hyper-V, with a friendly interface, and is closely integrated with the Microsoft ecosystem, suitable for enterprises that rely on Microsoft software.

The main tasks of Linux system administrators include system monitoring and performance tuning, user management, software package management, security management and backup, troubleshooting and resolution, performance optimization and best practices. 1. Use top, htop and other tools to monitor system performance and tune it. 2. Manage user accounts and permissions through useradd commands and other commands. 3. Use apt and yum to manage software packages to ensure system updates and security. 4. Configure a firewall, monitor logs, and perform data backup to ensure system security. 5. Troubleshoot and resolve through log analysis and tool use. 6. Optimize kernel parameters and application configuration, and follow best practices to improve system performance and stability.

Learning Linux is not difficult. 1.Linux is an open source operating system based on Unix and is widely used in servers, embedded systems and personal computers. 2. Understanding file system and permission management is the key. The file system is hierarchical, and permissions include reading, writing and execution. 3. Package management systems such as apt and dnf make software management convenient. 4. Process management is implemented through ps and top commands. 5. Start learning from basic commands such as mkdir, cd, touch and nano, and then try advanced usage such as shell scripts and text processing. 6. Common errors such as permission problems can be solved through sudo and chmod. 7. Performance optimization suggestions include using htop to monitor resources, cleaning unnecessary files, and using sy

The average annual salary of Linux administrators is $75,000 to $95,000 in the United States and €40,000 to €60,000 in Europe. To increase salary, you can: 1. Continuously learn new technologies, such as cloud computing and container technology; 2. Accumulate project experience and establish Portfolio; 3. Establish a professional network and expand your network.

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Linux new version
SublimeText3 Linux latest version
