This page looks best with JavaScript enabled

Monitoring Nvidia graphics card memory usage

 ·  🎃 kr0m

There are many occasions when it can be useful to monitor the status of our Nvidia graphics card. Some of these include when we want to check the hardware on our system, monitor the GPU’s temperature, or know how much VRAM is being used. This is of particular interest if we’re experimenting with AI image generation programs.


The first and simplest program to install is nvidia-smi. To install it, simply run:

apt install nvidia-utils-560

We can leave it running constantly using watch:

watch nvidia-smi

The second option is a slightly more sophisticated program called nvtop. There are several ways to install it, but they all fail:

  • Repos:
nvtop: ./src/extract_gpuinfo_intel.c:230: parse_drm_fdinfo_intel: Assertion `!cache_entry_check && "We should not be processing a client id twice per update"' failed.
Aborted (core dumped)
  • PPA:
Err:13 https://ppa.launchpadcontent.net/flexiondotorg/nvtop/ubuntu noble Release
  404  Not Found [IP: 185.125.190.80 443]
Hit:14 https://deb.packages.mattermost.com stable InRelease
Hit:15 https://packages.microsoft.com/repos/code stable InRelease
Reading package lists... Done
E: The repository 'https://ppa.launchpadcontent.net/flexiondotorg/nvtop/ubuntu noble Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
  • SNAP:
Error opening terminal: alacritty.
  • Source code: Finally, the only method that works without issues is compiling from source.

First, install the compilation dependencies:

sudo apt install libncurses5-dev libncursesw5-dev

Clone the repository and compile:

git clone https://github.com/Syllo/nvtop.git
mkdir -p nvtop/build
cd nvtop/build
cmake .. -DNVIDIA_SUPPORT=ON -DAMDGPU_SUPPORT=OFF -DINTEL_SUPPORT=OFF
make

You can run it from the local directory or install it system-wide:

./src/nvtop
sudo make install

The final result looks like this:

If you liked the article, you can treat me to a RedBull here