From owner-freebsd-hackers Mon Mar 19 21: 3:13 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161]) by hub.freebsd.org (Postfix) with ESMTP id CE6A837B729 for ; Mon, 19 Mar 2001 21:02:56 -0800 (PST) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (doconnor@cain [203.38.152.97]) by cain.gsoft.com.au (8.8.8/8.8.8) with ESMTP id PAA11475; Tue, 20 Mar 2001 15:32:22 +1030 (CST) (envelope-from doconnor@gsoft.com.au) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010319183135.B84536@rand.tgd.net> Date: Tue, 20 Mar 2001 15:32:22 +1030 (CST) From: "Daniel O'Connor" To: sean-freebsd-hackers@chittenden.org Subject: RE: Easy way to compute memory stats? (procfs?) Cc: freebsd-hackers@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 20-Mar-01 sean-freebsd-hackers@chittenden.org wrote: > Is there an easy way (from script ideally) to get the following > stats: > > free physical mem (avail ram) > free swap > total avail mem > > any two of the three would be great. If such a beast doesn't > exist, what are the easiest calls to use to get at them so I could > write some programs that would output this info. -sc I think you can get some of these from sysctl.. Unfortunatly I don't know the MIB's to use :) Try browsing sysctl -a You could also try calling vmstat, and/or iostat. --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message