Re: Get Available System Memory
- From: gordonb.e1bu8@xxxxxxxxxxx (Gordon Burditt)
- Date: Fri, 11 May 2007 02:07:15 -0000
But that's not what the OP asked. He asked about "currently available
system memory". That information is available,
That piece of information isn't even well-defined.
If a piece of physical memory contains a piece of a (heavily used)
shared library, it could be used to avoid a disk read of that shared
library, but it could also be used to satisfy a memory request
without having to write back a "dirty" page, is it "available"?
For that matter, is there any non-dirty page that is NOT "available"
if there's enough need for it?
That information is not available.That information seems to be available to programs like ps, free, top,
vmstat and others, available on most unix systems. Are we talking about
different things here?
What statistic output by any of those programs are you referring to?
There's more than one way to skin a cat.
You seem to be intent on defining "currently available system memory"
as some fuzzily-defined statistic that is allegedly available from
the OS, and then claiming it's available. But with that fuzzy a
definition, it no longer MEANS anything. Remember, you can compute
anything in 0 time and 0 bytes if the answer isn't required to be
correct.
How about settling for
free(1)'s definition of how much memory there's available, after
adjusting for buffer/cache, i.e. the so called "buffer adjusted" values?
I haven't seen that definition, but doesn't it depend a lot on the
underlying OS strategy of whatever OS it runs on for handling buffers
and cache?
If there is a bare minimum of processes running (e.g. single user mode,
with init, shell, and top running and nothing much else), wouldn't you
expect almost all of the memory to be "available"? top doesn't agree if
you've just finished running "fsck". On some systems anyway.
I know. The output may be either misleading or hard to interpret at
certain times/states, but the info is available. Agree?
If you want a statistic, you need to define what the statistic MEANS,
then try to find a way to compute it, not just define what you want
as being some allegedly available statistic.
.
- References:
- Get Available System Memory
- From: chsalvia
- Re: Get Available System Memory
- From: Bjørn Augestad
- Re: Get Available System Memory
- From: Gordon Burditt
- Re: Get Available System Memory
- From: Bjørn Augestad
- Get Available System Memory
- Prev by Date: Re: Get Available System Memory
- Next by Date: Re: Get Available System Memory
- Previous by thread: Re: Get Available System Memory
- Next by thread: Re: Get Available System Memory
- Index(es):
Relevant Pages
|