Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Previously I was checking the memory usage on my GPU with the following command:

nvidia-settings -q all | grep Memory

I am processing some scientific data on my GPU with numpy and theano. I was doing this with the gnome desktop running, and there was already 380 Mb of memory used on the device. So I stopped lightdm to free up a little more GPU memory; but, now the nvidia-settings tool no longer works.

It simply errors that there is no display

ERROR: Cannot open display ':0.0'.

Is there some other way of getting GPU memory without using this tool? Is there some way to use make it function in headless mode?

share|improve this question
Mitch (credit to) gives the answer here: nvidia-smi – xxjjnn Dec 7 '13 at 19:51
possible duplicate of – Kevin Bowen May 19 '14 at 7:17

For Nvidia GPUs


For Intel GPUs



aticonfig --odgc --odgt

Bouns Tips for real time watching exmaple

watch nvdia-smi

Finally, relax and you're welcome.

share|improve this answer
+1. Just a headsup: intel_gpu_tools (underscore, not dash), as a command. – IsaacS Jan 14 '15 at 20:09

Your Answer


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.