LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to find the amount of _real_ free memory (https://www.linuxquestions.org/questions/linux-software-2/how-to-find-the-amount-of-_real_-free-memory-626965/)

kenneho 03-10-2008 07:49 AM

How to find the amount of _real_ free memory
 
How can I find out how much free memory there actually is on my linux server? We going to launce an application on the server, but need to make sure that there is enough free memory for it to run.

"top" indicates that only around 1.5 GB of memory is used, while "free" says that 2.6 GB of memory is used.

Cyhaxor 03-10-2008 10:39 AM

try the command free... or free --help for more options.. :)

kenneho 03-10-2008 11:28 AM

Quote:

Originally Posted by Cyhaxor (Post 3083970)
try the command free... or free --help for more options.. :)

Thanks, but the problem stated in my post is that it seems as the command "free" does not seem to give the real amount of free memory. I'm sorry if I didn't make myself clear on that.

The "free" command says that 2.6 GBs of memory is used, while summarizing output from the "top" command shows that only around 1.5 GBs of memory are actually in use.

Uncle_Theodore 03-10-2008 11:38 AM

Quote:

Originally Posted by kenneho (Post 3084010)
Thanks, but the problem stated in my post is that it seems as the command "free" does not seem to give the real amount of free memory. I'm sorry if I didn't make myself clear on that.

The "free" command says that 2.6 GBs of memory is used, while summarizing output from the "top" command shows that only around 1.5 GBs of memory are actually in use.

So, by "free memory" you mean memory not used by applications? Look at the third line in the output of free, the one that starts with

-/+ buffers/cache:

It should give you a pretty good idea of how much memory is not used by applications.

H_TeXMeX_H 03-10-2008 11:58 AM

This has been posted before, but here it is again:

Code:

bash-3.1$ free
            total      used      free    shared    buffers    cached
Mem:      1033612    1013088      20524          0          0    872684
-/+ buffers/cache:    140404    893208
Swap:      1967952      2596    1965356

Your true free memory in this case is 893208 kB. This value excludes the disk cache, which will be overwritten when necessary automatically. The disk cache's purpose it speed up response time of programs that are used often by caching them, putting them in the disk cache in RAM.


All times are GMT -5. The time now is 07:29 PM.