How To Find Top 10 CPU Consuming Process In Linux/Ubuntu

Top-10-CPU-Consuming-Process
mm
Written By:- Santosh Prasad

In this article I will show you how you can find the top 10 CPU consuming process in Linux. As a system admin you always need to know which process is taking how much CPU in Linux and Ubuntu. Follow the below command to display the CPU usage per process in Linux terminal.

Find Top 10 CPU Consuming Process

# ps -eo pid,user,ppid,cmd,%mem,%cpu --sort=-%cpu | head

Below is the output of the command:

    PID USER        PPID CMD                         %MEM %CPU
 783560 apache     17214 /usr/sbin/httpd.worker       0.0  256
 561714 apache    561702 /usr/sbin/httpd.worker       0.6  141
 400371 apache     17214 /usr/sbin/httpd.worker       0.0 86.0
   7034 apache     17214 /usr/sbin/httpd.worker       0.0 85.6
  21344 100        11666 /usr/bin/perl -T /usr/share  0.7 73.2
 233111 497        10005 /usr/local/java/bin/java -D 15.1 18.2
   5191 apache     31196 /usr/sbin/httpd.worker       0.8  3.0
   1418 apache     31196 /usr/sbin/httpd.worker       0.7  2.9
 550159 saslauth  411762 nginx: worker process        0.2  1.2

Field Explanations:

  • e            : Select all the process
  • o            : User defined format, ps allows to specify the output format.
  • pid        : Process ID list.
  • ppid     : Parent process ID
  • sort      : Specify sorting order.
  • cmd       : Command’
  • %cpu     : CPU utilization of the process in “##.#” format.
  • %mem  : Ration of the process’resident set size to the physical memory on the machine, displayed in percentage.

I hope this article will help to find the top 10 CPU consuming process in Linux. If do you have any alternate please share with us.

Thanks:)

About Author

mm

Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Other Post by Santosh Prasad

Visit All Post

Related Article

You may also Like

Leave a Comment

Shares