LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-22-2007, 01:08 AM   #1
sharma.kashyap
Member
 
Registered: Apr 2006
Posts: 41

Rep: Reputation: 15
to find process using max memory


hi , i want to get the pid,user of process having maximum memory usage... i use top command to display list, but i need command which can give me only the highest mem using process.
kindly help
 
Old 02-22-2007, 01:41 AM   #2
4ajaysingh
LQ Newbie
 
Registered: Nov 2006
Posts: 29

Rep: Reputation: 15
Hi,

Use the top command.

In the field of %MEM, you will get memory usage by processes.


Enjoy
 
Old 02-22-2007, 01:46 AM   #3
sharma.kashyap
Member
 
Registered: Apr 2006
Posts: 41

Original Poster
Rep: Reputation: 15
i know , i can use top command and about field, i want u give the command at prompt and get result there only, not all the list
 
Old 02-22-2007, 11:28 AM   #4
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Something like this should work:
Code:
ps -eo pid,rsz,cmd --sort rsz | tail -n 1
This will list the top process by resident size, listing the PID, resident size, and command.
 
  


Reply

Tags
memory, ps


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
max % of CPU for one process uselpa Slackware 2 07-30-2005 09:21 AM
max process size textomat Linux - General 1 11-06-2004 02:10 PM
What is the max memory a process can use? shelby Linux - Hardware 1 04-27-2004 01:05 PM
Does anyone know the max memory a process can use? A_quest_guy Linux - General 7 07-18-2002 07:37 PM
max process limit anoop_chandran Linux - Networking 2 01-16-2002 06:22 AM


All times are GMT -5. The time now is 09:29 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration