From owner-freebsd-ports@FreeBSD.ORG Wed Jan 25 16:36:41 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB6DA16A420 for ; Wed, 25 Jan 2006 16:36:41 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id E31D843D4C for ; Wed, 25 Jan 2006 16:36:40 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id k0PGaeI1005232 for ; Wed, 25 Jan 2006 08:36:40 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id k0PGaeoT005231 for freebsd-ports@freebsd.org; Wed, 25 Jan 2006 08:36:40 -0800 Date: Wed, 25 Jan 2006 08:36:40 -0800 From: Brooks Davis To: freebsd-ports@freebsd.org Message-ID: <20060125163640.GD2848@odin.ac.hmc.edu> References: <20060124172317.GF72149@iib.unsam.edu.ar> <200601242058.k0OKwH2i016170@peedub.jennejohn.org> <20060125140731.GB79842@iib.unsam.edu.ar> <20060125161106.GB34407@pentarou.parodius.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x4pBfXISqBoDm8sr" Content-Disposition: inline In-Reply-To: <20060125161106.GB34407@pentarou.parodius.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Subject: Re: porting an app that checks /proc/meminfo X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2006 16:36:42 -0000 --x4pBfXISqBoDm8sr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 25, 2006 at 08:11:06AM -0800, Jeremy Chadwick wrote: > > way of getting these values? As I wrote in my reply to > > Brooks, perhaps some call that, although implemented > > differently in each OS, will have the same API for a > > programmer. So s/he can use it across different Unix OSes? >=20 > The only way I know of is to use a pre-existing library called > libstatgrab. The author has already written the code you want; and > yes, it's done how you think (re: "the awful way"); most of the > pain is relieved via the use of configure. libstatgrab works on > the following platforms: Something like this is basicly your only option for system stats. There is no POSIX API. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --x4pBfXISqBoDm8sr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFD16kWXY6L6fI4GtQRAk4iAJ47oj0evk7hz7S4DLDM88+jbrMAXACg1/F5 Y+r9apC1u5nI1xtUZ/VFsLI= =331e -----END PGP SIGNATURE----- --x4pBfXISqBoDm8sr--