LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to check memory usage on running process/applications (http://www.linuxquestions.org/questions/linux-general-1/how-to-check-memory-usage-on-running-process-applications-442940/)

rickylim 05-08-2006 08:47 PM

How to check memory usage on running process/applications
 
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

pk21 05-08-2006 09:20 PM

In this case, i would suggest the top command.

Linux~Powered 05-08-2006 09:22 PM

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.

rickylim 05-08-2006 09:24 PM

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.

bigrigdriver 05-08-2006 09:25 PM

Top. See the man pages for a complete discussion of options and displays.

pk21 05-08-2006 09:27 PM

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

rickylim 05-08-2006 09:44 PM

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

pk21 05-08-2006 09:45 PM

Try the top command again, as soon as top is running, press "m" to sort the processes by memory

rickylim 05-08-2006 09:48 PM

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

jitheshktv 11-02-2009 05:59 PM

Try 'M' (Upper case)

murankar 11-02-2009 06:05 PM

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.

chrism01 11-02-2009 07:46 PM

Guys, the 1st 9 posts are from 2006....

murankar 11-03-2009 04:20 PM

my bad; although the new tool htop is good to know. Hope it helps other people.

sakibsyl 10-26-2011 03:47 PM

Single process using how much memory
 
Guys,
After long discussion with my friend I have found the command
top -b -n 1 | grep -i (process name)
10th column is the actual memory usage.

lbeachmike 01-30-2012 11:29 PM

Even simpler would be just -

top -U <username>

That will show all processes under a specific username.


All times are GMT -5. The time now is 02:13 PM.