From owner-freebsd-questions Thu Jan 17 8:10:54 2002 Delivered-To: freebsd-questions@freebsd.org Received: from urdvg135.cms.usa.net (urdvg135.cms.usa.net [204.68.25.135]) by hub.freebsd.org (Postfix) with SMTP id 6C09637B400 for ; Thu, 17 Jan 2002 08:10:52 -0800 (PST) Received: (qmail 24006 invoked from network); 17 Jan 2002 16:18:30 -0000 Received: from cpdvg201.cms.usa.net (165.212.10.5) by outbound.postoffice.net with SMTP; 17 Jan 2002 16:18:30 -0000 Received: (qmail 24591 invoked by uid 60001); 17 Jan 2002 16:10:52 -0000 Message-ID: <20020117161052.24589.qmail@cpdvg201.cms.usa.net> Received: from 65.69.223.103 [65.69.223.103] by cpdvg201.cms.usa.net (USANET web-mailer 34FM.0700.28.01B); Thu, 17 Jan 2002 16:10:52 +0000 Date: 17 Jan 2002 10:10:52 CST From: shreenivasa H V To: freebsd-questions@freebsd.org Subject: Percentage CPU and the digital decay X-Mailer: USANET web-mailer (34FM.0700.28.01B) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 Hello, Why does freebsd accumulate the percentage CPU utilization (which is disp= layed by the 'ps' command) and then digitally decay it, instead of just keeping= track of it in the past interval only. What I mean is in Linux, they calc= ulate the PCPU by counting the number of ticks the process has used over the pa= st interval (between the two probes). But freebsd seems like accumulating it= over all the intervals and then normalising it so that it forgets some 95% in = 60 seconds. Why is it have to be such a round about process when it could ha= ve been done in a straight forward manner? You could just keep track of the number of ticks the process has used in a particular interval and get the= percentage from the total number of ticks in that interval. What's the logic behind this design decision? shreenivasa. = To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message