porting an app that checks /proc/meminfo

Fernan Aguero fernan at iib.unsam.edu.ar
Wed Jan 25 09:56:10 PST 2006


+----[ Brooks Davis <brooks at one-eyed-alien.net> (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


More information about the freebsd-ports mailing list