Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to determine the real "free" memory of a system? 1

Status
Not open for further replies.

tboege

Instructor
Mar 20, 2006
12
DE
And finally a third question:
If you're used to Linux, you'll probably know the "free" command. If someone is asking you about "how much free memory is left on this system right now", how can you EASILY determine this value?
Something like vmstat -o ?
Thanks a lot!
 
svmon -G

But if you've done many file reads at all, you won't see much free memory.

"how much free memory is left on this system right now?" is really too vague of a question. If they're asking about free RAM, the answer will be almost always be "next to none".

If they mean how much is available for added programs, then it depends on your definition of "EASILY", and whether paging is acceptable.

For rough estimates, which should be good enough:

First, execute the "svmon -G", then vmstat (without arguments).

The svmon "size" column value on the "memory" row is the physically installed memory, in 4K pages. The "avm" value from vmstat is the active virtual memory, also in 4K pages (most of the figures on the first line of vmstat are averages since boot, but avm and free are current figures).

If the avm value is lower than the svmon size value, then you have (size-avm)*4096 bytes of free physical memory. For total free memory, add (pg space size) - (pg space inuse) from the svmon output.

If the avm value is higher than the svmon size value, you can't add computational pages without paging some out, and with paging you'll have ((memory size) + (pg space size) - (pg space inuse) - avm)*4096 bytes available for programs.

These calculations don't take into account minperm, but should be good enough.

Rod Knowlton

IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

 
Thank you very much, that's the kind of information I was looking for!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top