Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

3 Answers 3

up vote 7 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 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.