LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 02: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:	41
Size:	104.1 KB
ID:	11251  
 
Old 11-16-2012, 03:55 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,152

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
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, 04:09 PM   #3
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,786

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
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, 05:56 PM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

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


Reply



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 10:36 PM
[SOLVED] what kernel processes are consuming cpu resources bino_linux Linux - Kernel 2 09-21-2010 08:07 AM
Warning in Top 10 cpu consuming processes pinga123 Linux - Newbie 13 08-11-2010 07:19 AM
Finding the top CPU-using processes? "top" command does not help... catalytical Linux - Server 1 04-06-2009 04:50 PM
CPU load high, top processes very low? Thinking Linux - Software 12 03-19-2007 12:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:02 AM.

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
Open Source Consulting | Domain Registration