LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-14-2010, 03:57 AM   #1
evansd321
LQ Newbie
 
Registered: Aug 2008
Posts: 24

Rep: Reputation: 0
Display processes % usage but I only want the process name and % used


Wonder if anyone can help me, I have to monitor the %MEM that processes are using, so I use the ps and sort command like this ....

ps -aux | sort -nk4

So this will sort by column 4 so I can see the all the processes that are using the highest %MEM.

What I really want is to be able to just display the process name and the %MEM next to it, does anyone know how to do this?

Thanks
 
Old 09-14-2010, 04:07 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,124

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Read the manpage - it even has examples to show how to output only columns you are interested in.
No need to pipe to sort either - "ps" allows you to sort (even reverse) on any column.
 
Old 09-14-2010, 06:24 AM   #3
evansd321
LQ Newbie
 
Registered: Aug 2008
Posts: 24

Original Poster
Rep: Reputation: 0
AWESOME!! .. thanks! I only ever looked at ps --help, thanks for the tip, all working now!
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
processes/CPU Usage/Mem Usage desktop wallpaper ceantuco Linux - Newbie 2 04-13-2009 01:14 PM
any way to see network usage by processes irfanhab Linux - Networking 3 04-19-2007 06:27 PM
Listing processes by memory usage? Seventh Linux - Newbie 3 06-17-2004 10:05 AM
How can I capping the CPU usage of processes ideasman Linux - Software 0 04-01-2004 03:52 AM
Memory usage when spawning child processes brianvdc Programming 4 10-24-2003 06:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:34 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