Monitor GPU Usage on Ubuntu and Other Linux Systems (2024)

Monitor GPU Usage on Ubuntu and Other Linux Systems (1)

When you have a GPU on board, integrated or dedicated, there are some programs that help you get the necessary stats to check its temperature, free memory, and more. You can use them on Ubuntu and other Linux distributions as well.

Unfortunately, default system monitoring tools and command-line utilities like htop or top do not display GPU usage data.

So, you need to use a couple of specific programs or terminal tools that would let you access the usage data for your graphics card or integrated GPU.

Here, I highlight the same after testing it on Ubuntu and Arch Linux.

Monitor GPU Usage on Ubuntu and Other Linux Systems (2)

If you do not mind installing a GUI program for the job, Mission Center should be your preferred tool.

It supports NVIDIA, AMD, and Intel GPUs. So, you do not have to think twice regarding the support for your hardware. However, with Intel GPUs, you may not get all the essential details compared to AMD and NVIDIA powered GPUs.

You can install it as a Flatpak from Flathub or download the AppImage from its GitLab releases section. It is also available in certain repositories like AUR for Arch Linux. Head to its GitLab page for more information.

The command for Flatpak installation is (any Linux distribution):

flatpak install flathub io.missioncenter.MissionCenter

For Arch Linux users, you can type in:

sudo pacman -S mission-center

Furthermore, refer to our AppImage guide if you are not familiar with the type of package.

Suggested Read 📖

9 System Monitoring Tools for Linux That are Better Than TopTop command is good but there are better alternatives. Take a look at these system monitoring tools that are similar to top, but better than it.It's FOSSAnkush Das

Command-line tools to check GPU stats

If you do not like GUI programs, don't worry, I got you. You have different ways you can monitor GPU usage stats, depending on which GPU your Linux system has.

nvidia-smi

For NVIDIA, you can simply type:

nvidia-smi -l 2

You do not need to install this. If you have your NVIDIA drivers installed (which should be the case by default on Ubuntu), you should be able to use this. We have NVIDIA driver installation guides for Linux Mint and Fedora that you can follow as well.

Monitor GPU Usage on Ubuntu and Other Linux Systems (5)

In the command, 2 → denotes the second interval in which the terminal will be refreshed. You can change this or opt to get updates in milliseconds by following the instructions on its man page.

nvtop

If you have a different GPU or want something else, try nvtop, which is used under-the-hood by Mission Center GUI.

Just type in the following to get it installed and then launch it:

sudo apt install nvtopnvtop
Monitor GPU Usage on Ubuntu and Other Linux Systems (6)

It supports both AMD and NVIDIA GPUs (with proprietary drivers only). You can also find it in for Arch and other distributions in the respective repositories.

gpustat

There's another tool: gpustat, a Python package that also gives you quick details regarding your GPU usage. You need pip installed on your Ubuntu or Linux system to get this installed.

It only works for NVIDIA proprietary drivers.

Once done, just type in the following:

pip install gpustat

If this fails for some reason, you can install python-pipx package, as an alternative, which I did on Arch Linux. Pipx manages a virtual environment for you to easily run the Python package. So, that is the only difference. The command would look like:

pipx install gpustat

Once done, launch it using the command:

gpustat
Monitor GPU Usage on Ubuntu and Other Linux Systems (7)

Wrapping Up

Whether you have an NVIDIA, AMD, or Intel GPU, monitoring your resources is helpful, especially, if you are system is not performing as intended. You also need to check if your GPU is being properly utilized for the programs you want it to offload tasks to instead of the CPU.

The terminal tool nvtop should be the best one in my option for stats on processing using the GPU, and the rest of the details. However, your preference can differ with just the default nvidia-smi or Mission Center GUI.

On a related note, you might want to keep a tab on the GPU temperature in Linux.

Monitoring CPU and GPU Temperatures in Linux TerminalThis article discusses two simple ways of monitoring CPU and GPU temperatures in the Linux command line.It's FOSSCommunity

💭 What do you think is the best way to check GPU usage on Linux? Let me know in the comments!

About the author

Ankush Das

A passionate technophile who also happens to be a Computer Science graduate. You will usually see cats dancing to the beautiful tunes sung by him.

Monitor GPU Usage on Ubuntu and Other Linux Systems (2024)

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Duane Harber

Last Updated:

Views: 6062

Rating: 4 / 5 (71 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Duane Harber

Birthday: 1999-10-17

Address: Apt. 404 9899 Magnolia Roads, Port Royceville, ID 78186

Phone: +186911129794335

Job: Human Hospitality Planner

Hobby: Listening to music, Orienteering, Knapping, Dance, Mountain biking, Fishing, Pottery

Introduction: My name is Duane Harber, I am a modern, clever, handsome, fair, agreeable, inexpensive, beautiful person who loves writing and wants to share my knowledge and understanding with you.