From owner-freebsd-ports@FreeBSD.ORG Wed Jan 25 17:56:10 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 3E13816A420 for ; Wed, 25 Jan 2006 17:56:10 +0000 (GMT) (envelope-from fernan@iib.unsam.edu.ar) Received: from smtp.unsam.edu.ar (smtp.unsam.edu.ar [170.210.48.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id D608643D60 for ; Wed, 25 Jan 2006 17:55:56 +0000 (GMT) (envelope-from fernan@iib.unsam.edu.ar) Received: from pi.iib.unsam.edu.ar (pi.iib.unsam.edu.ar [192.168.10.11]) by smtp.unsam.edu.ar (8.12.6/8.12.6) with ESMTP id k0PHrBUr024608; Wed, 25 Jan 2006 14:53:13 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) Received: from pi.iib.unsam.edu.ar (localhost [127.0.0.1]) by pi.iib.unsam.edu.ar (8.13.1/8.13.1) with ESMTP id k0PHtHdD080738; Wed, 25 Jan 2006 14:55:21 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) Received: (from fernan@localhost) by pi.iib.unsam.edu.ar (8.13.1/8.13.1/Submit) id k0PHst9r080734; Wed, 25 Jan 2006 14:54:56 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) X-Authentication-Warning: pi.iib.unsam.edu.ar: fernan set sender to fernan@iib.unsam.edu.ar using -f Date: Wed, 25 Jan 2006 14:54:54 -0300 From: Fernan Aguero To: Brooks Davis Message-ID: <20060125175454.GA80668@iib.unsam.edu.ar> Mail-Followup-To: Brooks Davis , freebsd-ports@freebsd.org, Jeremy Chadwick , Gary Jennejohn References: <20060124172317.GF72149@iib.unsam.edu.ar> <200601242058.k0OKwH2i016170@peedub.jennejohn.org> <20060125140731.GB79842@iib.unsam.edu.ar> <20060125161106.GB34407@pentarou.parodius.com> <20060125163640.GD2848@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060125163640.GD2848@odin.ac.hmc.edu> User-Agent: Mutt/1.5.9i Cc: Gary Jennejohn , Jeremy Chadwick , freebsd-ports@freebsd.org 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 17:56:10 -0000 +----[ Brooks Davis (25.Jan.2006 13:42): | | 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? | > | > 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 | +----] Thanks! This was the authoritative answer I wanted to hear. And also, thanks everyone for the good suggestions and pointers. I've already pointed the author to this thread, and I'll be helping him to test whatever alternative he decides to implement in my FreeBSD box. Fernan