LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-16-2012, 03:45 PM   #1
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Rep: Reputation: Disabled
Top 10 processes consuming most cpu


SHOW TOP 10 PROCESSES CONSUMING MOST CPU

I can't understand problems from my linux system ..
Quote:
$ watch 'ps -eo pcpu, pid, user, args | sort -k 1 -n -r | head -10'
While issuing this query please see attached screen shot ..
then i checked to find error but not ..
Quote:
[root@localhost ~]# echo $?
0
Quote:
[root@localhost ~]# watch ps aux | grep 4851 | grep -v grep
My system hangs ... Still no output .. every time i use ctrl +c
Attached Thumbnails
Click image for larger version

Name:	linux.png
Views:	30
Size:	104.1 KB
ID:	11251  
 
Old 11-16-2012, 04:55 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,056

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
When you have problems with compound commands, run each of the commands separately, and make sure they work.
The manpage for watch has some comments about the effects of quoting.
 
Old 11-16-2012, 05:09 PM   #3
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Arch
Posts: 3,063

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
Here is what I got from that command:
Code:
Every 2.0s: ps -eo pcpu, pid, user, args | sort -k 1 -n...  Fri Nov 16 17:02:21 2012

error: improper list

Usage:
 ps [options]

 Try 'ps --help <simple|list|output|threads|misc|all>'
  or 'ps --help <s|l|o|t|m|a>'
 for additional help text.

For more details see ps(1).
 
1 members found this post helpful.
Old 11-16-2012, 06:56 PM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,052

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
are you aware of the command: top ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU usage by processes using top command mrme Linux - Software 3 02-24-2012 11:36 PM
[SOLVED] what kernel processes are consuming cpu resources bino_linux Linux - Kernel 2 09-21-2010 09:07 AM
Warning in Top 10 cpu consuming processes pinga123 Linux - Newbie 13 08-11-2010 08:19 AM
Finding the top CPU-using processes? "top" command does not help... catalytical Linux - Server 1 04-06-2009 05:50 PM
CPU load high, top processes very low? Thinking Linux - Software 12 03-19-2007 01:59 AM


All times are GMT -5. The time now is 01:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration