LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-10-2008, 07:49 AM   #1
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Rep: Reputation: 40
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.
 
Old 03-10-2008, 10:39 AM   #2
Cyhaxor
Member
 
Registered: Nov 2004
Location: UK
Distribution: Fedora 12
Posts: 129

Rep: Reputation: 15
try the command free... or free --help for more options..
 
Old 03-10-2008, 11:28 AM   #3
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by Cyhaxor View Post
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.
 
Old 03-10-2008, 11:38 AM   #4
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
Quote:
Originally Posted by kenneho View Post
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.
 
Old 03-10-2008, 11:58 AM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
check amount of memory naijaguy Linux - General 4 10-15-2008 02:11 PM
Command to display amount of memory rust8y Linux - Newbie 4 05-20-2006 07:30 PM
Increasing the amount of cached memory balteo Linux - General 1 09-16-2005 04:06 PM
checking amount of free memory sanjith11 Linux - Software 6 05-13-2004 10:11 AM
X uses an excessive amount of memory! ~80Mb kamstrup Linux - Software 3 08-18-2003 06:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration