Hi Mark,

Is there a command that tells Linux to really memory that is really
not in use? I'm sure top is not the best app for looking at this so

yes there is: i.e. "free -m". the line starting with "-/+" tells you what's used by apps without filesystem cache and buffers and what's free. the "-m" is for using MegaBytes as unit.


I was trying out a program that ended up using all of memory and about
700MB of swap. I eventually exited the program, cleanly I think, but
after 15 minutes Linux said that all 775MB of main memory and 400MB of
swap was still in use.

Once some thing swaped out it will swap in only if it is needed, or if you run "swapoff -a". use top and "M" to sort by mem-usage. and make shure that your apps exited.


I understand that swap memory (and maybe main memory) are not by
default immediately given back to the system, but is there a way for
me to tell the system to go collect everything and get the system back
to something close to this reboot state?

No. You can not tell the system to forget all cache/buffers. The kernel reduces dynamicaly this memory regions if they are needed by your apps. You can imagine cache/buffers as "quasi free". There is realy no reason to worry about. linux does not eat memory :-).


Sascha.

--
[email protected] mailing list



Reply via email to