LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This 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
 
Thread Tools
Old 05-08-2006, 09:47 PM   #1
rickylim
Member
 
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68
Thanked: 0
How to check memory usage on running process/applications


[Log in to get rid of this advertisement]
Dear all,

i have a red hat enterprise linux running in my server.

my default login is init 3 (without GUI).

However, everytime when i run #startx to start the gui the memory usage shoot up to almost 95%, and when i logout from the gui it will still remain high at 80%.

Previously i have checked, if reboot my pc in init 3 it only consume 10% of the memory usage.

My questions:-
1) what's the command that i can use to check the memory usage for each of the running process/application so that i can kill the process.

Please advice.

Many thanks.

rgds.
Lim
rickylim is offline     Reply With Quote
Old 05-08-2006, 10:20 PM   #2
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 547
Thanked: 0
In this case, i would suggest the top command.
pk21 is offline     Reply With Quote
Old 05-08-2006, 10:22 PM   #3
Linux~Powered
Member
 
Registered: Jan 2004
Location: /lost+found
Distribution: Slack`er-current
Posts: 843
Thanked: 0
Don't worry about the memory usage. That's what memory is for. It's normal for Linux to use your RAM like that. What do you have it for if you're not going to use it? To list applications with processes and memory run 'top' from the command line.
Linux~Powered is offline     Reply With Quote
Old 05-08-2006, 10:24 PM   #4
rickylim
Member
 
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68
Thanked: 0

Original Poster
i've tried using top command.

but one page is not enough to show all the running processes.

i tried to scroll down, but couldn't get down.

please advice.
rickylim is offline     Reply With Quote
Old 05-08-2006, 10:25 PM   #5
bigrigdriver
Senior Member
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: openSUSE 10.3 Debian 4.0
Posts: 4,654
Thanked: 13
Top. See the man pages for a complete discussion of options and displays.
bigrigdriver is offline     Reply With Quote
Old 05-08-2006, 10:27 PM   #6
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 547
Thanked: 0
Quote:
Originally Posted by rickylim
i've tried using top command.

but one page is not enough to show all the running processes.

i tried to scroll down, but couldn't get down.
Try: ps fauxwww
pk21 is offline     Reply With Quote
Old 05-08-2006, 10:44 PM   #7
rickylim
Member
 
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68
Thanked: 0

Original Poster
Dear all, thanks for your reply.

you guys are very helpful.

i am having a 512MB ram, and now the usage is 500MB and the server has not been running life yet. can't imagine if we start running it as mail server for 600 users account.

i've tried #ps fauxwww, yea it lists the processes and memory.

but i still can't find which process is actually taking such a huge memory usage.

please advice on what to do.

Many thanks

rgds.
Lilm
rickylim is offline     Reply With Quote
Old 05-08-2006, 10:45 PM   #8
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 547
Thanked: 0
Try the top command again, as soon as top is running, press "m" to sort the processes by memory
pk21 is offline     Reply With Quote
Old 05-08-2006, 10:48 PM   #9
rickylim
Member
 
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68
Thanked: 0

Original Poster
Hi PK21,

i tried running #top

and type m once top is running, but it only hide and unhide the memory usage on the top.

please help.

thanks
rickylim is offline     Reply With Quote
Old 11-02-2009, 06:59 PM   #10
jitheshktv
LQ Newbie
 
Registered: Oct 2009
Posts: 1
Thanked: 0
Try 'M' (Upper case)
windows_xp_2003 jitheshktv is offline     Reply With Quote
Old 11-02-2009, 07:05 PM   #11
murankar
Member
 
Registered: Jan 2008
Location: Cleveland Ohio
Distribution: Current Ubuntu/Kubuntu
Posts: 100
Thanked: 4
there is a new top command out called htop. It is top but updated with more useful tools. give it shot and see if that shows what you need.
linuxubuntu murankar is offline     Reply With Quote
Old 11-02-2009, 08:46 PM   #12
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 5.4
Posts: 7,439
Thanked: 326
Guys, the 1st 9 posts are from 2006....
windows_xp_2003 chrism01 is offline     Reply With Quote
Old 11-03-2009, 05:20 PM   #13
murankar
Member
 
Registered: Jan 2008
Location: Cleveland Ohio
Distribution: Current Ubuntu/Kubuntu
Posts: 100
Thanked: 4
my bad; although the new tool htop is good to know. Hope it helps other people.
linuxubuntu murankar is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 programmatically monitor a process memory usage? thanhvn Programming 14 02-20-2009 02:15 AM
how to show the memory usage per process ty263 Linux - General 3 09-12-2008 07:36 AM
how to programmatically monitor a process memory usage? thanhvn Linux - Software 1 11-15-2005 09:44 PM
about displaying process memory usage maginotjr Slackware 2 09-13-2005 12:43 PM
Process memory usage wombat53 Linux - Newbie 5 07-21-2005 08:42 PM


All times are GMT -5. The time now is 02:01 AM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration