Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jan 2006 23:46:56 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
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:  <20060110054656.GE89638@dan.emsphone.com>
In-Reply-To: <20060110031453.89250.qmail@web30004.mail.mud.yahoo.com>
References:  <20060110031453.89250.qmail@web30004.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@allantgroup.com



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