From owner-freebsd-questions@FreeBSD.ORG Thu Oct 19 15:12:34 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 F165816A415 for ; Thu, 19 Oct 2006 15:12:34 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6816E43D68 for ; Thu, 19 Oct 2006 15:12:28 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.6/8.13.8) id k9JFCRQf061001; Thu, 19 Oct 2006 10:12:27 -0500 (CDT) (envelope-from dan) Date: Thu, 19 Oct 2006 10:12:27 -0500 From: Dan Nelson To: Ashok TM , RW Message-ID: <20061019151226.GC96296@dan.emsphone.com> References: <200610191510.38162.list-freebsd-2004@morbius.sent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200610191510.38162.list-freebsd-2004@morbius.sent.com> X-OS: FreeBSD 6.2-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-questions@freebsd.org Subject: Re: sysinfo equivalent in Freebsd X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2006 15:12:35 -0000 In the last episode (Oct 19), Ashok TM said: > In linux we have "sysinfo" system call which provides overall system > statistics. > struct sysinfo { > long uptime; /* Seconds since boot */ > unsigned long loads[3]; /* 1, 5, and 15 minute load averages */ > unsigned long totalram; /* Total usable main memory size */ > unsigned long freeram; /* Available memory size */ > unsigned long sharedram; /* Amount of shared memory */ > unsigned long bufferram; /* Memory used by buffers */ > unsigned long totalswap; /* Total swap space size */ > unsigned long freeswap; /* swap space still available */ > unsigned short procs; /* Number of current processes */ > unsigned long totalhigh; /* Total high memory size */ > unsigned long freehigh; /* Available high memory size */ > unsigned int mem_unit; /* Memory unit size in bytes */ > } > > How to find the similar statistics from freebsd , is there any equivalent > system call in freebsd. ? In the last episode (Oct 19), RW said: > On Thursday 19 October 2006 07:05, Ashok TM wrote: > > > How to find the similar statistics from freebsd , is there any equivalent > > system call in freebsd. ? > > > > I tried using WMMemFree (ports to bsd )without much luck . > > top gets this kind of thing from sysctl. Specifically: kern.boottime for uptime vm.loadavg for system load vm.stats.vm.* for the memory stats -- Dan Nelson dnelson@allantgroup.com