using get_system_info() - obtaining system load averages
kamal kc
kamal_ckk at yahoo.com
Tue Jan 10 03:28:22 PST 2006
--- Peter Jeremy <PeterJeremy at optushome.com.au> wrote:
> 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.
>
thanks , it worked !!!!
i used the ldavg[] and fscale of averunnable to get
the system load.
you people are great ..
kamal
__________________________________________
Yahoo! DSL Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
More information about the freebsd-hackers
mailing list