Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-22-2013, 12:02 AM   #1
Registered: May 2012
Posts: 86

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


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 ?

Old 05-22-2013, 12:26 AM   #2
Registered: Dec 2005
Location: In front of the monitor
Distribution: Slackware
Posts: 312

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 12:33 AM.
Old 05-22-2013, 08:03 AM   #3
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, 09:17 AM   #4
Registered: May 2012
Posts: 86

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

Rep: Reputation: 37
If you want to know top 10 processes which are eating CPU.
$ 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.
$ mpstat (to display the utilization of each CPU individually) for multiple cpu systems.
Usage of each cpu
$ mpstat -P ALL
Display today’s CPU activity
$ sar
iostat command which report (CPU) statistics and I/O statistics for devices and partitions.
$ iostat
Old 05-27-2013, 01:27 AM   #6
Registered: Jan 2010
Posts: 82

Rep: Reputation: 1
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.

Old 05-27-2013, 08:04 AM   #7
Registered: Mar 2013
Posts: 619

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

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


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 09:09 PM
How to check Top memory consuming process In Gb LittleMaster Linux - Server 6 06-16-2012 11:21 PM
Command to check process taking high cached memory rajaniyer123 Linux - General 1 02-05-2012 03:52 PM
High Memory utilzation by Mysql Process in Solaris rajaniyer123 Solaris / OpenSolaris 2 05-26-2011 07:44 AM
Server consuming cache memory vikas027 Linux - Server 10 03-06-2009 01:28 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration