When you have got a GPU on board, built-in or devoted, there are some applications that enable you to get the mandatory stats to examine its temperature, free reminiscence, and extra. You need to use them on Ubuntu and different Linux distributions as nicely.
Sadly, default system monitoring instruments and command-line utilities like htop or high don’t show GPU utilization information.
So, you might want to use a few particular applications or terminal instruments that may allow you to entry the utilization information in your graphics card or built-in GPU.
Right here, I spotlight the identical after testing it on Ubuntu and Arch Linux.
If you don’t thoughts putting in a GUI program for the job, Mission Middle ought to be your most popular software.
It helps NVIDIA, AMD, and Intel GPUs. So, you do not need to suppose twice relating to the assist in your {hardware}. Nonetheless, with Intel GPUs, it’s possible you’ll not get all of the important particulars in comparison with AMD and NVIDIA powered GPUs.
You possibly can set up it as a Flatpak from Flathub or obtain the AppImage from its GitLab releases part. Additionally it is obtainable in sure repositories like AUR for Arch Linux. Head to its GitLab web page for extra info.
The command for Flatpak set up is (any Linux distribution):
flatpak set up flathub io.missioncenter.MissionCenter
For Arch Linux customers, you possibly can sort in:
sudo pacman -S mission-center
Moreover, seek advice from our AppImage information in case you are not aware of the kind of package deal.
Advised Learn 📖
If you don’t like GUI applications, don’t be concerned, I received you. You’ve got alternative ways you possibly can monitor GPU utilization stats, relying on which GPU your Linux system has.
nvidia-smi
For NVIDIA, you possibly can merely sort:
nvidia-smi -l 2
You do not want to put in this. When you’ve got your NVIDIA drivers put in (which ought to be the case by default on Ubuntu), you need to be capable of use this. We’ve got NVIDIA driver set up guides for Linux Mint and Fedora that you would be able to observe as nicely.
Within the command, 2 → denotes the second interval wherein the terminal shall be refreshed. You possibly can change this or choose to get updates in milliseconds by following the directions on its man web page.
nvtop
When you’ve got a distinct GPU or need one thing else, attempt nvtop, which is used under-the-hood by Mission Middle GUI.
Simply sort within the following to get it put in after which launch it:
sudo apt set up nvtop
nvtop
It helps each AMD and NVIDIA GPUs (with proprietary drivers solely). You may also discover it in for Arch and different distributions within the respective repositories.
gpustat
There’s one other software: gpustat, a Python package deal that additionally provides you fast particulars relating to your GPU utilization. You want pip put in in your Ubuntu or Linux system to get this put in.
✋
It solely works for NVIDIA proprietary drivers.
As soon as completed, simply sort within the following:
pip set up gpustat
If this fails for some purpose, you possibly can set up python-pipx package deal, instead, which I did on Arch Linux. Pipx manages a digital surroundings so that you can simply run the Python package deal. So, that’s the solely distinction. The command would appear like:
pipx set up gpustat
As soon as completed, launch it utilizing the command:
gpustat
Wrapping Up
Whether or not you have got an NVIDIA, AMD, or Intel GPU, monitoring your sources is useful, particularly, in case you are system shouldn’t be performing as supposed. You additionally must examine in case your GPU is being correctly utilized for the applications you need it to dump duties to as a substitute of the CPU.
The terminal software nvtop ought to be one of the best one in my possibility for stats on processing utilizing the GPU, and the remainder of the main points. Nonetheless, your desire can differ with simply the default nvidia-smi or Mission Middle GUI.
On a associated word, you may wish to preserve a tab on the GPU temperature in Linux.
💠What do you suppose is one of the best ways to examine GPU utilization on Linux? Let me know within the feedback!