Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jan 2006 20:09:55 +1100
From:      Peter Jeremy <PeterJeremy@optushome.com.au>
To:        kamal kc <kamal_ckk@yahoo.com>
Cc:        freebsd <freebsd-hackers@freebsd.org>
Subject:   Re: using get_system_info() - obtaining system load averages
Message-ID:  <20060110090955.GF60380@cirb503493.alcatel.com.au>
In-Reply-To: <20060110075910.72058.qmail@web30006.mail.mud.yahoo.com>
References:  <20060110054656.GE89638@dan.emsphone.com> <20060110075910.72058.qmail@web30006.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2006-Jan-09 23:59:10 -0800, kamal kc wrote:
>thanks i tried getloadavg() it worked.
>
>but when i tried to put it in the kernel the kernel
> failed to link. 

You didn't mention the kernel bit before.  To access
the load average in the kernel, you just access
"averunnable" (see <sys/resource.h>).  Note that you
cannot do floating point arithmetic in the kernel so
the load averages are stored as fixed point numbers.

-- 
Peter Jeremy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060110090955.GF60380>