Using the top command in the terminal lists processes, sorted by their CPU usage (and you can change it to sort by another parameter)

Is there an equivalent for the GPU?

This fellow is asking about RAM used by GPU

share|improve this question
2  
Deppending, if you are using a radeon you can use radeontop, for nvidia there's another tool but I don't have the name at hand. – Braiam Dec 7 '13 at 19:39
up vote 44 down vote accepted

For Nvidia GPUs there is a tool nvidia-smi that can show memory usage, GPU utilization and temperature of GPU.

For Intel GPU's you can use the intel-gpu-tools.

AMD has two options, fglrx (closed source drivers)

aticonfig --odgc --odgt

And for mesa (open source drivers), you can use RadeonTop Install via the software center.

Source:GPU usage monitoring

share|improve this answer
19  
Use watch nvidia-smi for real-time updates. – Lenar Hoyt Nov 20 '14 at 22:00
1  
aticonfig won't work over SSH. Claims it needs an X server running to work (there is one running). However, RadeonTop (sudo apt-get radeontop) does work with the fglrx (needs root). Hurrah! Sadly RadeonTop doesn't provide any temperature readings. – Ken Sharp Jan 5 '15 at 9:58
    
aticonfig WILL work over SSH, but an X server with tcp enabled needs to be running. This can be done by configuring lightdm via xserver-allow-tcp=true. Searching around this site with these keywords should lead to the result. – HAL 9001 Feb 18 '16 at 0:20

Nvidia: to continuously update the output of nvidia-smi, you can use nvidia-smi --loop=1 (refresh interval of 1 second) or nvidia-smi --loop-ms=1000 (refresh interval of 1000 milliseconds).

   -l SEC, --loop=SEC
       Continuously  report  query data at the specified interval, rather than
       the default of  just  once.   The  application  will  sleep  in-between
       queries.   Note  that on Linux ECC error or XID error events will print
       out during the sleep period if the -x flag was not specified.  Pressing
       Ctrl+C at any time will abort the loop, which will otherwise run indef‐
       initely.  If no argument is specified for the -l form a default  inter‐
       val of 5 seconds is used.

   -lms ms, --loop-ms=ms
       Same as -l,--loop but in milliseconds.

FYI:

share|improve this answer

You can use gpustat, which is a simple command-line script (wrapper for nvidia-smi) for querying and monitoring GPU status:

enter image description here

share|improve this answer
    
+1 for giving a free software general solution – Nemo Jul 21 '17 at 10:11

You can use the monitoring program glances with its GPU monitoring plug-in:

  • open source
  • to install: sudo apt-get install -y python-pip; sudo pip install glances[gpu]
  • to launch: sudo glances

enter image description here

It also monitors the CPU, disk IO, disk space, network, and a few other things:

enter image description here

share|improve this answer
2  
Great tool, thank you! – Lior Magen Jun 28 '17 at 7:15

I use the following command:

nvidia-smi -l 2

and it gives me updates every 2 seconds.

looks like this

Or :

watch -n0.1 "nvidia-settings -q GPUUtilization -q useddedicatedgpumemory"

And on AMD, use:

aticonfig --odgc --odgt

enter image description here

share|improve this answer

For Intel:

  1. Install intel-gpu-tools (its likely that they are installed already)

sudo apt-get install intel-gpu-tools

  1. Start the top like utility intel_gpu_top
  2. Check your Stats and then exit with <Ctrl+C>

Thats what you get:

enter image description here

Thanks @Mitch! :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.