From owner-freebsd-questions@FreeBSD.ORG Wed Jan 28 13:54:33 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 B233316A4CE for ; Wed, 28 Jan 2004 13:54:33 -0800 (PST) Received: from priv-edtnes46.telusplanet.net (defout.telus.net [199.185.220.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67BA243D1D for ; Wed, 28 Jan 2004 13:54:32 -0800 (PST) (envelope-from cpressey@catseye.mine.nu) Received: from catseye.biscuit.boo ([207.81.17.215]) by priv-edtnes46.telusplanet.netSMTP <20040128215432.TFEN22760.priv-edtnes46.telusplanet.net@catseye.biscuit.boo>; Wed, 28 Jan 2004 14:54:32 -0700 Date: Wed, 28 Jan 2004 13:58:43 -0800 From: Chris Pressey To: Rowdy Message-Id: <20040128135843.7d453814.cpressey@catseye.mine.nu> In-Reply-To: <401828E8.5090907@fielden.com.au> References: <401823B2.7050400@fielden.com.au> <20040128211153.GA40209@wopr.caltech.edu> <401828E8.5090907@fielden.com.au> 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 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: Wed, 28 Jan 2004 21:54:33 -0000 On Thu, 29 Jan 2004 08:26:00 +1100 Rowdy wrote: > Matthew Hunt wrote: > > > On Thu, Jan 29, 2004 at 08:03:46AM +1100, Rowdy wrote: > > > > > >>I am setting up MRTG and at the moment I am parsing /var/run/dmesg.boot > >>and the output from `top -b -d 1` to get total and free memory > >>respectively, but I hope there is an easier way. > > > > > > Try "vmstat" instead. > > > > Thought of that. According to the man page, vmstat shows, for memory: > > avm active virtual pages > fre size of the free list > > Does the size of the free list correspond to actual free memory? I > wasn't sure whether that was the case or not. > > Also, it's a case of parsing the output from top or parsing the output > from vmstat - I had hoped there would be a simple command that would > show memory state :) > > Dave 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