using get_system_info() - obtaining system load averages
Dan Nelson
dnelson at allantgroup.com
Mon Jan 9 21:46:59 PST 2006
In the last episode (Jan 09), kamal kc said:
> dear everybody,
>
> i want to use the routine get_system_info() to get the load averages
> of the cpu. i found it that top uses it.
get_system_info is just a function /in/ top itself that gets the CPU
usage. It uses the vm.loadavg sysctl to get the load average. A
simpler way is to just call the getloadavg() function; see its manpage
for more info.
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-hackers
mailing list