Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 May 2002 19:32:10 +0200
From:      Axel Scheepers <axel@axel.truedestiny.net>
To:        Richard Shea <richardshea@fastmail.fm>
Cc:        Roger 'Rocky' Vetterberg <listsub@rambo.simx.org>, FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: getting amount of ram with sysctl
Message-ID:  <20020504193209.E13115@mars.thuis>
In-Reply-To: <20020503020359.6C4C56DA62@fastmail.fm>; from richardshea@fastmail.fm on Fri, May 03, 2002 at 02:03:59AM %2B0000
References:  <20020503020359.6C4C56DA62@fastmail.fm>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

This behaviour probably comes due to the fact the kernel memory is
substracted from the real phys mem. The kernel's internal data 
structures also grow and shrink, so the value changes a bit in time.

Gr,

-- 
Axel Scheepers
UNIX System Administrator

email: axel@axel.truedestiny.net
       a.scheepers@iae.nl
http://axel.truedestiny.net/~axel
------------------------------------------
Expert, n.:
	Someone who comes from out of town and shows slides.
------------------------------------------

On Fri, May 03, 2002 at 02:03:59AM +0000, Richard Shea wrote:
> On Fri, 03 May 2002 03:17:37 +0200, "Roger 'Rocky' Vetterberg"
> <listsub@rambo.simx.org> said:
> > Richard Shea wrote:
> > 
> > > Hi - Sorry I don't have an answer to your question but I would like to
> > > do this myself and I don't know how (I don't know how to do it at all,
> > > forget about accuracy !). 
> > > 
> > > I've looked at 'man sysctl' and I can't see the variables you have
> > > mentioned - the nearest i've got is 'vm.loadavg'.
> > > 
> > > Could you post the actual command you're using so that I could try it ?
> > > 
> > > Sorry about not answering your question, I'm sure someone will !
> > > 
> > > regards
> > > 
> > > richard shea.
> > 
> > The commands are just 'sysctl vm.stats.vm.v_page_size' and 
> > 'sysctl vm.stats.vm.v_page_count'.
> > 
> > Someone just told me about 'sysctl hw.physmem' which gives me a 
> > slightly more accurate value, but Im still missing a few megs.
> > 
> Thanks very much. Just for the record I get
> 
> sysctl vm.stats.vm.v_page_size = 4096
> sysctl vm.stats.vm.v_page_count = 7345
> 
> which comes out as : 30,085,120
> 
> and
> 
> sysctl hw.physmem = 30,584,832
> 
> Which is quite a bit of difference. As far as I'm aware the box I'm
> running these on is a '32 Mb machine' which to my way of thinking
> should mean that :
> 
> sysctl hw.physmem = 33,554,432
> 
> I'm sure there's stuff I don't know about this that would account for
> some difference between '32 Mb machine' and they physmem but all the
> same ~ 9% does seem quite a large discrepancy.
> 
> Doubtless someone out there can explain this ... ?
> 
> regards
> 
> richard shea
> 
> 
> 
> 
> -- 
> http://fastmail.fm - One of many happy users:
>   http://www.fastmail.fm/docs/quotes.html
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020504193209.E13115>