2 Tools For Monitoring Nvidia GPUs On Linux (GUI And Command Line)

This article presents 2 tools for monitoring Nvidia graphics cards on Linux: one that comes with a terminal user interface (TUI), so it runs in a console, and another one that uses a graphical user interface.

These utilities to monitor Nvidia GPUs require using the proprietary Nvidia graphics drivers.

nvtop - terminal user interface to monitor Nvidia GPUs


nvtop Nvidia GPU top

nvtop is a (h)top like task monitor for Nvidia GPUs. It uses the ncurses to draw its text-based user interface in the terminal, and it makes use of the NVIDIA Management Library (NVML) to get the GPU information.

Since it uses NVML, this command line tool doesn't support older Nvidia GPUs. GeForce 600, GeForce 800M, and newer should work, but older GPUs are not supported.

nvtop features:

  • supports multiple GPUs
  • shows a list of processes running on the Nvidia GPU, their name, pid, their utilization of GPU, memory and CPU, etc. The processes can be sorted and killed from nvtop
  • shows a graph of GPU and memory utilization
  • shows current (live) GPU and memory utilization and frequency, fan speed, power usage, and temperature

nvtop was recently added to the Ubuntu 19.04+, and Debian buster and sid (contrib) repositories. But if you want to use it with drivers that aren't in the repositories (e.g. if you use newer drivers), it won't install because it depends on the specific drivers version that's in the repositories. In that case install it from source, it's quite easy.

The nvtop README has instructions for building the tool from source (including the required dependencies) for Debian / Ubuntu, Fedora / RedHat / CentOS, openSUSE and Arch Linux.

Nvidia System Monitor GUI for Linux


Nvidia System Monitor for Linux

Nvidia System Monitor is a new graphical tool to see a list of processes running on the GPU, and to monitor the GPU and memory utilization (using graphs) of Nvidia graphics cards. It makes use of the nvidia-smi tool to get the GPU information.

This Nvidia task manager for Linux is only 12 days old, so it still needs some work. The developer says other functions, like the ability to monitor the Nvidia GPU temperature, making the program available in other languages, and more, will be added in the next versions.

Nvidia System Monitor features:

  • Processes: shows a list of processes running on the GPU, with the process name, pid, used memory, and more
  • GPU Utilization: shows a graph of the GPU utilization, while also showing the average, minimum and maximum GPU utilization
  • Memory Utilization: shows a graph of the Nvidia GPU memory utilization, while also showing the average, minimum and maximum memory utilization. You can also see here the total, free and used GPU memory.

By default, Nvidia System Monitor is updated every 2 seconds (2000 ms). If you want to change this, create a file called nvidia-system-monitor in the ~/.config folder, and add updateDelay followed by the time in ms to this file. For example, use updateDelay 500 to have NVIDIA System Monitor update every 500 ms (0.5 seconds).

Nvidia System Monitor for Linux

To install NVIDIA System Monitor, you'll need wxgtk3, wxgtk2, and g++. Also install Git to get the latest code of the application from Git, since it contains an important fix, and the latest release might not work on anything other than Arch Linux. In Debian, Ubuntu or Linux Mint, install these packages using:

sudo apt install git g++ python-wxgtk3.0-dev libwxgtk3.0-gtk3-dev

To get Nvidia System Monitor from Git, build and install it, use:

git clone https://github.com/congard/nvidia-system-monitor
cd nvidia-system-monitor
./make.sh
sudo ./install.sh

Since you run the install script with with sudo, make sure you check out what it does before running it!

If you want to uninstall it, use sudo ./uninstall.sh in the nvidia-system-monitor directory.