Want to know how much of your GPU is being used on Linux? Whether you’re gaming, training machine learning models, or monitoring performance, Linux offers several ways to check GPU usage — both through command line and GUI tools.
Here’s how to do it.
1. Check GPU Usage for NVIDIA Cards
If you’re using an NVIDIA GPU, the easiest way to check usage is with the nvidia-smi
tool.
Install NVIDIA Drivers and Tools
Most distros require the proprietary NVIDIA driver to use nvidia-smi
. Install it with:
sudo apt install nvidia-driver nvidia-smi # For Debian/Ubuntu
sudo dnf install xorg-x11-drv-nvidia # For Fedora
Run the Command
nvidia-smi
This will display GPU load, memory usage, temperature, and running processes. It updates once per run — for live stats, use:
watch -n 1 nvidia-smi
2. Check GPU Usage for AMD Cards
AMD cards use different tools, depending on the driver and system.
Option A: Using radeontop
Install it via:
sudo apt install radeontop # Ubuntu/Debian
sudo dnf install radeontop # Fedora
Run it with:
sudo radeontop
This shows a live readout of GPU usage, similar to top
for CPUs.
Option B: Use amdgpu-pro
Tools (if using AMD’s official drivers)
AMD’s proprietary drivers include clinfo
and amd-info
, which can show usage stats — though it’s more limited than NVIDIA’s tool.
3. Using glxinfo
and vulkaninfo
(General Info)
If you just want to verify your GPU is active and what it supports:
glxinfo | grep "OpenGL renderer"
Or for Vulkan-based systems:
vulkaninfo | less
Install with:
sudo apt install mesa-utils vulkan-tools
4. Use GUI Tools for Easy Monitoring
- GNOME System Monitor Extensions: Some distros support GPU plugins.
- Psensor: Monitor GPU temperature and load.
- KSysGuard (KDE): With the right sensors, you can monitor GPU usage graphically.
5. Monitor with htop
+ GPU Plugins
While htop
doesn’t show GPU stats by default, some third-party tools like nvtop
offer a similar look for NVIDIA GPUs:
sudo apt install nvtop
Run with:
nvtop
It shows real-time usage per process, just like htop
.
Final Thoughts
Linux gives you several powerful options to track GPU usage — it just depends on your hardware. For NVIDIA users, nvidia-smi
is your go-to. For AMD, try radeontop
. And if you prefer GUI tools, there are solid desktop options too.
Have a favorite tool or ran into a problem? Drop a comment and let’s troubleshoot it together.
Leave a Reply