Date: Thu, 18 Oct 2001 21:05:51 -0600 (CST) From: Ryan Thompson <ryan@sasknow.com> To: "Jonathan M. Slivko" <jslivko@4evermail.com> Cc: freebsd-questions@FreeBSD.ORG Subject: RE: Loads on a Web/Shell Server Message-ID: <Pine.BSF.4.21.0110182057150.211-100000@ren.sasknow.com> In-Reply-To: <005401c15849$98bf8630$252da818@sioux>
next in thread | previous in thread | raw e-mail | index | archive | help
Jonathan M. Slivko wrote to 'Ryan Thompson':
> Is there any mathematical equation for figuring out how loads are
> computed, etc? -- Jonathan
Yep. The load averages are sampled at specific intervals, and are
calculated by counting the number of processes waiting to run and
adjusting the value reflected in the sysctl variable:
# sysctl vm.loadavg
vm.loadavg: { 3.41 3.12 3.10 }
If kernel code doesn't scare you, grep for the loadav function in the vm
sources in /usr/src/sys/vm/. It's only about 20 lines' worth IIRC.
- Ryan
--
Ryan Thompson <ryan@sasknow.com>
Network Administrator, Accounts
SaskNow Technologies - http://www.sasknow.com
#106-380 3120 8th St E - Saskatoon, SK - S7H 0W2
Tel: 306-664-3600 Fax: 306-664-1161 Saskatoon
Toll-Free: 877-727-5669 (877-SASKNOW) North America
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0110182057150.211-100000>
