How To See Current GPU VRAM Usage On Linux? (NVIDIA & AMD)

Here are 3 simple ways to see your current GPU VRAM usage for both NVIDIA and AMD graphics cards on most available Linux distributions. If you want to monitor the stats including video memory use in real-time, read on. Time saving hint: The AMD solution is the last one.

Check out also: Run Stable Diffusion WebUI With Less Than 4GB of VRAM – Quick Guide

Method 1 – (NVIDIA) – Using The NVIDIA SMI

NVIDIA System Management Interface tool output.
An example output of the NVIDIA System Management Interface tool showing the current GPU VRAM usage, alongside other data.

This method will work on almost every Linux distro out there, albeit only with NVIDIA graphics cards. Using the NVIDIA System Management Interface

To check your current graphics card VRAM usage (and another GPU stats updated live), simply type the nvidia-smi -l 1 command in your system terminal.

There’s no need to install anything here, as the NVIDIA SMI comes with your system display drivers. But there is one situation in which it might not work correctly, and that is when your particular GPU isn’t supported. If that’s the case, you need to use a different utility to view the stats you need.

On Linux, you can either use the NVIDIA System Management Interface with the command nvidia-smi -l 1 if you’re using an NVIDIA GPU, or use a neat and nicely readable wrapper for it, like gpustat to see your current live GPU stats including the VRAM usage, updated in real-time.

Method 2 – (NVIDIA) – Using gpustat

Gpustat NVIDIA graphics card stats display Linux tool.
gpustat gives you much more readable output than the official NVIDIA SMI utility.

Another way to see your current GPU stats on Linux systems, this time presented in a nicer way is to use a simple 3rd party open-source tool called gpustat developed by wookayin.

With Python (ver. >=3.6) on your system, and the appropriate version of the nvidia-ml-py installed (see the official requirements here), the only thing you need to do to use the tool is to use pip to install it. Use the following command: pip install gpustat in your system terminal, and you should be ready to go.

After successful installation, type in the following example command into your terminal to view your GPU stats: gpustat -a to display all of the data available for your graphics card. For the full list of available commands, as well as the reporting timer interval settings, refer to the official GitHub repository for the tool here.

Method 3 – (AMD) – Using amdgpu_top

Finally, here is the method fit for AMD cards running under Linux. With the rather slow updates of the radeontop tool – a monitoring tool for AMD GPUs, a new piece of software has emerged – the amdgpu_top written fully in Rust, which is to my knowledge, the most up-to-date tool for viewing AMD GPU stats including live VRAM usage on Linux.

This tool might be the best way to access your live GPU statistics on almost all Unix-based systems. | Image source: amdgpu_top repository.

You can either install the tool using the distributed release packages, or build it from source. Either way, to see the simple installation instructions, visit the official GitHub repository for the tool here.

As you can see on the image above, you can view the data either in your terminal, or by using the app’s graphical user interface. There are separate installation instructions for the versions with and without GUI, so keep that in mind.

That’s All Folks!

So, these were the best tools that you can use for viewing not only how much VRAM your graphics card currently uses, but also many other GPU stats you might have not even thought about.

Whether you’ve dabbling with some deep learning, AI-based tools like Stable Diffusion or OobaBooga WebUI, or anything else for that matter, you now have a little bit more insight into your system than before. I hope this short article has helped you out! Until next time!

You might also like: How To Install Automatic1111 WebUI On Linux (Ubuntu, Debian & Arch)

Related Articles

Latest Articles