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 02-22-2007, 12: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, 12: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, 12: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, 10:28 AM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
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



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 08:21 AM
max process size textomat Linux - General 1 11-06-2004 01:10 PM
What is the max memory a process can use? shelby Linux - Hardware 1 04-27-2004 12:05 PM
Does anyone know the max memory a process can use? A_quest_guy Linux - General 7 07-18-2002 06:37 PM
max process limit anoop_chandran Linux - Networking 2 01-16-2002 05:22 AM

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

All times are GMT -5. The time now is 09:05 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
Open Source Consulting | Domain Registration