From owner-freebsd-questions Thu Oct 18 20: 6: 0 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ren.sasknow.com (ren.sasknow.com [207.195.92.131]) by hub.freebsd.org (Postfix) with ESMTP id 19BAC37B405 for ; Thu, 18 Oct 2001 20:05:54 -0700 (PDT) Received: from localhost (ryan@localhost) by ren.sasknow.com (8.9.3/8.9.3) with ESMTP id VAA36426; Thu, 18 Oct 2001 21:05:52 -0600 (CST) (envelope-from ryan@sasknow.com) Date: Thu, 18 Oct 2001 21:05:51 -0600 (CST) From: Ryan Thompson To: "Jonathan M. Slivko" Cc: freebsd-questions@FreeBSD.ORG Subject: RE: Loads on a Web/Shell Server In-Reply-To: <005401c15849$98bf8630$252da818@sioux> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 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