From owner-freebsd-questions@FreeBSD.ORG Thu Jan 29 13:40:03 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C12C16A4CE for ; Thu, 29 Jan 2004 13:40:03 -0800 (PST) Received: from priv-edtnes51.telusplanet.net (defout.telus.net [199.185.220.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBAB743D2F for ; Thu, 29 Jan 2004 13:39:58 -0800 (PST) (envelope-from cpressey@catseye.mine.nu) Received: from catseye.biscuit.boo ([207.81.17.215]) by priv-edtnes51.telusplanet.netSMTP <20040129213958.RTPN2774.priv-edtnes51.telusplanet.net@catseye.biscuit.boo>; Thu, 29 Jan 2004 14:39:58 -0700 Date: Thu, 29 Jan 2004 13:44:12 -0800 From: Chris Pressey To: Jez Hancock Message-Id: <20040129134412.79a4d86a.cpressey@catseye.mine.nu> In-Reply-To: <20040129212907.GB23190@users.munk.nu> References: <401823B2.7050400@fielden.com.au> <20040128211153.GA40209@wopr.caltech.edu> <401828E8.5090907@fielden.com.au> <20040128135843.7d453814.cpressey@catseye.mine.nu> <401976FE.3040007@fielden.com.au> <20040129212907.GB23190@users.munk.nu> Organization: Cat's Eye Technologies X-Mailer: Sylpheed version 0.9.8a (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org cc: david@fielden.com.au Subject: Re: showing total/free memory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2004 21:40:03 -0000 On Thu, 29 Jan 2004 21:29:07 +0000 Jez Hancock wrote: > On Fri, Jan 30, 2004 at 08:11:26AM +1100, Rowdy wrote: > > Chris Pressey wrote: > > > > >Well, I'm not sure if it works on 5.x, but you could try > > > > > > /usr/ports/sysutils/muse > > > > > >Should be easier to parse than the other options. > > > > > >-Chris > You could always output the results of dmesg at boot-time to a file - > adding something like this: > > dmesg > /var/log/dmesg.boot > > to /usr/local/etc/rc.local. This already happens, to /var/run/dmesg.boot Not sure how to account for the discrepancy - presumably it's not counting memory that can't be used under FreeBSD (possibly the 'wired' memory, for the kernel, and some other stuff.) If you really need the real total memory on the machine (as opposed to what's available to the operating system,) you should probably parse /var/run/dmesg.boot (which isn't difficult - just grep for 'real memory' and take the fourth field with e.g. awk '{ print $4 }'.) -Chris