LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-22-2013, 01:02 AM   #1
redhat70
Member
 
Registered: May 2012
Posts: 86

Rep: Reputation: Disabled
How to check which Process consuming High Memory in the SERVER?


Hi,

How to check which process consuming Huge MEMORY in the Redhat Linux Server ?


top is giving all the processes, but I want to find out which Process consuming High Memory in the server?

Can anybody help me with the commands ?


Regards,
Aparna.
 
Old 05-22-2013, 01:26 AM   #2
Nikosis
Member
 
Registered: Dec 2005
Location: In front of the monitor
Distribution: Slackware
Posts: 310

Rep: Reputation: 59
Another way would be htop then you can sort it by memory usage with "M" or press F6 and pick sort option, same with top except F6 part. I advise checking man pages for these and many other options.

Last edited by Nikosis; 05-22-2013 at 01:33 AM.
 
Old 05-22-2013, 09:03 AM   #3
theNixGuy
LQ Newbie
 
Registered: May 2013
Location: USA & India
Distribution: CentOS & Ubuntu
Posts: 8

Rep: Reputation: Disabled
Have you tried "htop"? Much better utility then top.
 
1 members found this post helpful.
Old 05-23-2013, 10:17 AM   #4
redhat70
Member
 
Registered: May 2012
Posts: 86

Original Poster
Rep: Reputation: Disabled
Thanks for your response to my query.
 
Old 05-25-2013, 09:30 AM   #5
bloodstreetboy
Member
 
Registered: May 2012
Posts: 195
Blog Entries: 3

Rep: Reputation: 37
If you want to know top 10 processes which are eating CPU.
Quote:
$ ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10
There are some other commands which show CPU & memory usage :

Install sysstat & try following command, sysstat is not a command.
Quote:
$ mpstat (to display the utilization of each CPU individually) for multiple cpu systems.
Usage of each cpu
Quote:
$ mpstat -P ALL
Display today’s CPU activity
Quote:
$ sar
iostat command which report (CPU) statistics and I/O statistics for devices and partitions.
Quote:
$ iostat
 
Old 05-27-2013, 02:27 AM   #6
yogesh_attarde
Member
 
Registered: Jan 2010
Posts: 78

Rep: Reputation: 0
Hi Aparna,

run the top command then hit Shift + f , then choose the display to order by memory usage by hitting key n then press enter. You will see active process ordered by memory usage.


Regards,
Yogesh
 
Old 05-27-2013, 09:04 AM   #7
eklavya
Member
 
Registered: Mar 2013
Posts: 590

Rep: Reputation: 131Reputation: 131
On Linux in the top process you can press < key to shift the output display sort left. By default it is sorted by the %CPU so if you press the key 4 times you will sort it by VIRT which is virtual memory size giving you your answer.

Another way to do this is:

Quote:
ps -e -o pid,vsz,comm= | sort -n -k 2 -r | head -10
should give you and output sorted by processes virtual size.
 
  


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
How to check memory usage on running process/applications rickylim Linux - General 17 05-08-2013 10:09 PM
How to check Top memory consuming process In Gb LittleMaster Linux - Server 6 06-17-2012 12:21 AM
Command to check process taking high cached memory rajaniyer123 Linux - General 1 02-05-2012 04:52 PM
High Memory utilzation by Mysql Process in Solaris rajaniyer123 Solaris / OpenSolaris 2 05-26-2011 08:44 AM
Server consuming cache memory vikas027 Linux - Server 10 03-06-2009 02:28 AM


All times are GMT -5. The time now is 12:37 PM.

Main Menu
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