gnunet-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNUnet-developers] Re: Round 1


From: Blake Matheny
Subject: Re: [GNUnet-developers] Re: Round 1
Date: Fri, 15 Mar 2002 11:14:56 -0500
User-agent: Mutt/1.3.27i

OK, I looked over the glibc cvs logs and it looks like getloadavg() wasn't
added to glibc until October of 1999. So, I modified statuscalls.c so that if
the system has getloadavg() it uses that. If the system doesn't have
getloadavg() and is a Linux system it uses the old method (groveling through
/proc/stat). Eventually it would be nice to just be able to use getloadavg(),
but I'm sure someone out there has an old glibc with a newer Linux kernel.
Thanks for the info James.
-Blake

Whatchu talkin' 'bout, Willis?
> Actually, linux has a getloadavg() as well, though you have to define
> either _BSD_SOURCE or _GNU_SOURCE to use it. From the man page:
> 
>     The getloadavg function returns the number of processes in
>     the system run queue  averaged  over  various  periods  of
>     time.   Up  to nelem samples are retrieved and assigned to
>     successive elements of loadavg[].  The  system imposes  a
>     maximum  of 3 samples, representing averages over the last
>     1, 5, and 15 minutes, respectively.
> 

-- 
Blake Matheny
address@hidden
PGP-Key http://www.dbaseiv.net/purdue.key



reply via email to

[Prev in Thread] Current Thread [Next in Thread]