From owner-freebsd-questions Sat May 4 10:33:47 2002 Delivered-To: freebsd-questions@freebsd.org Received: from axel.truedestiny.net (a185066.upc-a.chello.nl [62.163.185.66]) by hub.freebsd.org (Postfix) with ESMTP id 7519337B4CF for ; Sat, 4 May 2002 10:32:08 -0700 (PDT) Received: by axel.truedestiny.net (Postfix, from userid 1000) id 70E6C49AB2; Sat, 4 May 2002 19:32:10 +0200 (CEST) Date: Sat, 4 May 2002 19:32:10 +0200 From: Axel Scheepers To: Richard Shea Cc: Roger 'Rocky' Vetterberg , FreeBSD Questions Subject: Re: getting amount of ram with sysctl Message-ID: <20020504193209.E13115@mars.thuis> Reply-To: Axel Scheepers References: <20020503020359.6C4C56DA62@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020503020359.6C4C56DA62@fastmail.fm>; from richardshea@fastmail.fm on Fri, May 03, 2002 at 02:03:59AM +0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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" > 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