Take the 2-minute tour ×
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 5 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
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

 
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.