Re: Amount of free memory available in system?

2002-01-12 Thread Ken Bolingbroke


Pardon me, I just realized I misread the original question.  Never mind.

Ken Bolingbroke
[EMAIL PROTECTED]

On Sat, 12 Jan 2002, Ken Bolingbroke wrote:

>
>
> On Sat, 12 Jan 2002, Nate Williams wrote:
>
> > I was hoping to get do 'sysctl foo.bar.bletch' to tell me information.
>
> From: http://people.freebsd.org/~adrian/sysctl.descriptions
>
>   hw.physmem: Physical memory in system
>   hw.usermem: Physical memory avaliable to user processes
>
> Ken Bolingbroke
> [EMAIL PROTECTED]
>
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message
>


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



Re: Amount of free memory available in system?

2002-01-12 Thread Ken Bolingbroke



On Sat, 12 Jan 2002, Nate Williams wrote:

> I was hoping to get do 'sysctl foo.bar.bletch' to tell me information.

From: http://people.freebsd.org/~adrian/sysctl.descriptions

  hw.physmem: Physical memory in system
  hw.usermem: Physical memory avaliable to user processes

Ken Bolingbroke
[EMAIL PROTECTED]


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



Re: Amount of free memory available in system?

2002-01-12 Thread Chad David

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



Re: Amount of free memory available in system?

2002-01-12 Thread Nate Williams

> > 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.


Nate

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



Re: Amount of free memory available in system?

2002-01-12 Thread Kris Kennaway

On Sat, Jan 12, 2002 at 11:30:27AM -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.

Kris



msg30933/pgp0.pgp
Description: PGP signature


Amount of free memory available in system?

2002-01-12 Thread Nate Williams

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?

Note, I've disabled swapping, since the *ONLY* thing running is an MFS
at the point I'm checking.

/stand/sysctl vm.defer_swapspace_pageouts=1
/stand/sysctl vm.disable_swapspace_pageouts=1



Nate

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