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 |
In this case, i would suggest the top command.
|
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.
|
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. |
Top. See the man pages for a complete discussion of options and displays.
|
Quote:
|
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 |
Try the top command again, as soon as top is running, press "m" to sort the processes by memory
|
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 |
Try 'M' (Upper case)
|
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.
|
Guys, the 1st 9 posts are from 2006....
|
my bad; although the new tool htop is good to know. Hope it helps other people.
|
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. |
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 03:04 PM. |