Results 1 to 7 of 7
Is there a way to clear the RAM in Linux
without rebooting? I know that *all* of it
cannot be cleared as long as any application
including the services and ...
- 02-28-2005 #1Just Joined!
- Join Date
- Oct 2004
- Posts
- 13
Clear RAM without rebooting?
Is there a way to clear the RAM in Linux
without rebooting? I know that *all* of it
cannot be cleared as long as any application
including the services and gui stuff is
running.. but I've been trying to see how
much RAM this or that application uses
and I have been doing that by bringing up
kde's "sytemguard" to watch the RAM
changes as I invoke and then kill certain
aps. But in order to drop the RAM way
down to very little I have noticed that merely
logging out makes no change, and tells me
that those aps that were killed are still in
memory until the system is rebooted.
That's why I'd like to know if there is a way
to clear as much RAM as I can without
having to reboot.
This is Mepis, a Debian clone, on a machine
with 512Mb of RAM.
-- Jerry
- 02-28-2005 #2Linux Engineer
- Join Date
- Aug 2004
- Posts
- 826
Run an app. Let's say gaim. While it's running do
I getCode:ps aux | grep gaim
from running that command.frankel 4378 4.2 3.1 20860 15784 ?? S 1:40PM 0:00.68 gaim
Here's an explanation:
ps aux is a process status utility. Using the | (pipe) pipes a command through it, in this case grep which will search for the word "gaim" in whatever program it's piped through.
For my results,
"frankel" is my username
"4378" is the PID
"4.2" is CPU usage of process "gaim"
"3.1" is % of RAM process "gaim" is using - this is what I want to know.
Now you need to know how much RAM you have. If you don't know,I have about 512MB, so 3.1% of 512 is about 16MB.Code:dmesg | grep memory
- 02-28-2005 #3Linux Newbie
- Join Date
- Sep 2003
- Location
- St.Charles, Missouri, USA
- Posts
- 201
The linux kernel works under the assumption that unused mem is wasted mem. It dynamicly caches disks in the mem so that things run faster and it allows mem to any app that needs it on demand. If you want to see how much you have free the run the command 'free' and subtract the amount used for caches to see usage.
Powered by Gentoo
never ever ever use the hardened option in make.conf!
- 03-01-2005 #4
to simplify what gwalters said, Linux will constantly attempt to store as much in memory as possible as it can be accessed 100's of times faster than the hardisk, so don't fret that your RAM will fill quickly and stay full, this is a significant speed increaser.
- 03-02-2005 #5Just Joined!
- Join Date
- Oct 2004
- Posts
- 13
Thank you all for your informative responses!
- 05-17-2005 #6Just Joined!
- Join Date
- May 2005
- Posts
- 9
Thanks everyone for this as well, I went searching on google and it brought me back here. My question is answered.
Awesome0.
- 05-17-2005 #7Just Joined!
- Join Date
- Mar 2005
- Location
- Sweden
- Posts
- 47
Me too
just wanted to say thanks for this information...



