Please refer the following command to get  processes by % cpu usage  under Linux or Unix System

#ps -e -o pcpu,cpu,nice,state,cputime,args –sort pcpu | sed ‘/^ 0.0 /d’
[root@pwas2 ~]# ps -e -o pcpu,cpu,nice,state,cputime,args –sort pcpu | sed ‘/^  0.0 /d’
%CPU CPU  NI S     TIME COMMAND
2.7   –   0 S 00:00:03 /usr/local/apache/bin/httpd -k start
2.7   –   0 S 00:00:10 /usr/local/apache/bin/httpd -k start
3.2   –   0 S 00:00:21 /usr/local/apache/bin/httpd -k start
3.3   –   0 S 00:00:03 /usr/local/apache/bin/httpd -k start
3.3   –   0 S 00:01:09 /usr/local/apache/bin/httpd -k start
3.5   –   0 S 00:00:02 /usr/local/apache/bin/httpd -k start
3.6   –   0 S 00:00:58 /usr/local/apache/bin/httpd -k start
3.6   –   0 S 00:00:02 /usr/local/apache/bin/httpd -k start
3.6   –   0 S 00:00:19 /usr/local/apache/bin/httpd -k start
3.7   –   0 S 00:02:47 /usr/local/apache/bin/httpd -k start
3.7   –   0 R 00:00:03 /usr/local/apache/bin/httpd -k start
3.7   –   0 S 00:00:09 /usr/local/apache/bin/httpd -k start
3.8   –   0 S 00:00:30 /usr/local/apache/bin/httpd -k start
3.8   –   0 S 00:01:22 /usr/local/apache/bin/httpd -k start
3.8   –   0 S 00:01:02 /usr/local/apache/bin/httpd -k start
3.8   –   0 S 00:00:18 /usr/local/apache/bin/httpd -k start
3.8   –   0 S 00:00:03 /usr/local/apache/bin/httpd -k start
3.9   –   0 S 00:02:06 /usr/local/apache/bin/httpd -k start
3.9   –   0 S 00:03:43 /usr/local/apache/bin/httpd -k start
3.9   –   0 S 00:01:34 /usr/local/apache/bin/httpd -k start
3.9   –   0 S 00:02:57 /usr/local/apache/bin/httpd -k start
4.0   –   0 S 00:03:00 /usr/local/apache/bin/httpd -k start
4.0   –   0 S 00:02:40 /usr/local/apache/bin/httpd -k start
4.0   –   0 S 00:01:25 /usr/local/apache/bin/httpd -k start
4.0   –   0 S 00:02:36 /usr/local/apache/bin/httpd -k start
4.0   –   0 S 00:02:19 /usr/local/apache/bin/httpd -k start
4.1   –   0 S 00:02:42 /usr/local/apache/bin/httpd -k start
4.1   –   0 S 00:02:56 /usr/local/apache/bin/httpd -k start
4.1   –   0 S 00:00:41 /usr/local/apache/bin/httpd -k start
4.1   –   0 S 00:06:10 /usr/local/apache/bin/httpd -k start
4.1   –   0 S 00:06:15 /usr/local/apache/bin/httpd -k start
4.1   –   0 S 00:01:49 /usr/local/apache/bin/httpd -k start
4.1   –   0 S 00:02:34 /usr/local/apache/bin/httpd -k start
4.1   –   0 S 00:02:22 /usr/local/apache/bin/httpd -k start
4.2   –   0 S 00:01:04 /usr/local/apache/bin/httpd -k start
4.2   –   0 S 00:02:17 /usr/local/apache/bin/httpd -k start
4.2   –   0 S 00:00:22 /usr/local/apache/bin/httpd -k start
4.2   –   0 S 00:00:58 /usr/local/apache/bin/httpd -k start
4.2   –   0 S 00:00:28 /usr/local/apache/bin/httpd -k start
4.2   –   0 S 00:02:16 /usr/local/apache/bin/httpd -k start

Post By Gishore J Kallarackal (2,121 Posts)

Gishore J Kallarackal is the founder of techgurulive. The purpose of this site is to share information about free resources that techies can use for reference. You can follow me on the social web, subscribe to the RSS Feed or sign up for the email newsletter for your daily dose of tech tips & tutorials. You can content me via @twitter or e-mail.

Website: → Techgurulive

Connect