Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

Is there any way to find out from terminal which process is causing high CPU Usage ?

It would also be useful to order processes in descending order of cpu Usage

share|improve this question
up vote 9 down vote accepted

top will display what is using your CPU. If you have it installed, htop allows you more fine-grained control, including filtering by—in your case—CPU

share|improve this answer
Top is often less than useful. First because processes often fluctuate - it's not unusual to see process that is completely occupying the cpu occasionally flicker to 0% in top, and if you have multiple intensive processes running they can alternate, taking turns to use 100% while the other uses 0%, making it hard to read. Also, sometimes the numbers are just strange - e.g. right now my top is reporting that all individual processes are using 0% cpu, but the total is 52% - so which one is doing it? – Benubird Sep 23 '15 at 7:18
ps -eo pcpu,pid,user,args | sort -k1 -r | head -10

Works for me, show the top 10 cpu using threads

share|improve this answer

You can probably use ps xo pid,cmd --sort=%cmd | tail -1, but top will show in real time.

share|improve this answer

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.