LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-17-2009, 07:37 AM   #1
Shashank Rachamalla
LQ Newbie
 
Registered: Mar 2009
Posts: 9

Rep: Reputation: 0
Thumbs up Finding total free memory available for use by applications.


Hi

I want to find the total free memory that is available for use by applications at a given instance of time. After little exploration I found that kernel allocates some amount of physical memory to cache and buffers while holding the right to reclaim a part of it when applications fall short of memory. The following information can be fetched from /proc/meminfo.

MemFree - The amount of physical RAM, in kilobytes, left unused by the system

Cached — The amount of physical RAM, in kilobytes, used as cache memory.

Buffers — The amount of physical RAM, in kilobytes, used for file buffers.

Active - The total amount of buffer or page cache memory, in kilobytes, that is in active use. This is memory that has been recently used and is usually not reclaimed for other purposes.

Inactive - The total amount of buffer or page cache memory, in kilobytes, that are free and available. This is memory that has not been recently used and can be reclaimed for other purposes.

(see - http://www.redhat.com/docs/manuals/e...c-meminfo.html for understanding attributes in /proc/meminfo )

Total Memory available for use by applications = MemFree + Inactive should hold good in this case. What do you suggest?

Also should (Cached + Buffers) = (Active + Inactive) hold good?
 
Old 08-17-2009, 09:25 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Have you also considered swap memory on the disk (and the cached swap in physical ram)?

Last edited by neonsignal; 08-17-2009 at 09:26 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Total Memory Ammad Linux - General 5 12-17-2008 10:02 AM
Finding total number of Hard-disks arunka Linux - Hardware 1 02-13-2006 10:26 PM
Total newbie - help with installing downloaded applications. ReuvenNY Linux - Newbie 9 09-03-2005 10:12 AM
finding size of total files in a directory blackzone Linux - Newbie 3 01-07-2005 03:01 AM
finding total used space by a user in a directory vince_2x Linux - General 1 09-21-2004 06:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:33 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