On Sat, Jan 12, 2002 at 04:21:58PM -0700, Nate Williams wrote:
> > > Is there a simple sysctl or a command line utility I can use to
> > > determine how much free memory is available in a system?
> > > 
> > > I've got an embedded application that has *very* limited memory, and I
> > > was trying to figure out how much memory was available for the userland
> > > applications.
> > > 
> > > 'top' has something, as well as 'vmstat'.  Unfortunately, because of the
> > > limited amount of disk space available on this box, I don't have access
> > > to either one of those.
> > > 
> > > Is there a sysctl I can use to determine how much free memory is
> > > available on the box?
> > 
> > Why not look how top and vmstat calculate it and do that in your code.
> 
> I was hoping to get do 'sysctl foo.bar.bletch' to tell me information.

vm.stats.vm.v_free_count will give you a somewhat useful number.  As well
there are sysctls for active, inactive, and cached (and wired), which you
could use to get a more complete picture of whats going on.

`sysctl vm` dumps a lot of useful information.

I hope that helps.

-- 
Chad David        [EMAIL PROTECTED]
www.FreeBSD.org   [EMAIL PROTECTED]
ACNS Inc.         Calgary, Alberta Canada
Fourthly, The constant breeders, beside the gain of eight shillings
sterling per annum by the sale of their children, will be rid of the
charge of maintaining them after the first year. - Johnathan Swift

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to