From owner-freebsd-audit Sun Jan 20 16: 1:30 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mailout08.sul.t-online.com (mailout08.sul.t-online.com [194.25.134.20]) by hub.freebsd.org (Postfix) with ESMTP id 1EE7137B400; Sun, 20 Jan 2002 16:01:27 -0800 (PST) Received: from fwd05.sul.t-online.de by mailout08.sul.t-online.com with smtp id 16SRtm-0007hy-02; Mon, 21 Jan 2002 01:01:18 +0100 Received: from Gatekeeper.FreeBSD.org (520047440004-0001@[80.132.243.249]) by fmrl05.sul.t-online.com with esmtp id 16SRtl-09nz8KC; Mon, 21 Jan 2002 01:01:17 +0100 Received: from StefanEsser.FreeBSD.org (StefanEsser [10.0.0.1]) by Gatekeeper.FreeBSD.org (Postfix) with ESMTP id BDA935F0F; Mon, 21 Jan 2002 01:01:40 +0100 (CET) Received: by StefanEsser.FreeBSD.org (Postfix, from userid 200) id A4C05C05; Mon, 21 Jan 2002 01:04:58 +0100 (CET) Date: Mon, 21 Jan 2002 01:04:58 +0100 From: Stefan Esser To: Peter Jeremy Cc: freebsd-audit@FreeBSD.ORG, Stefan Esser Subject: Re: systat(1) bugs Message-ID: <20020121000458.GA95702@StefanEsser.FreeBSD.org> Reply-To: Stefan Esser References: <20020121093532.D72285@gsmx07.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020121093532.D72285@gsmx07.alcatel.com.au> User-Agent: Mutt/1.3.26i X-Sender: 520047440004-0001@t-dialin.net Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-01-21 09:35 +1100, Peter Jeremy wrote: > I am currently (but slowly) working on a patch to clean this up, but > don't want to duplicate anyone elses work. If anyone else is working > on systat, they might like to get in touch. The namei Dir-cache % display is wrong, since it calculates the percentage based on the total number of requests, not based on the number of Name-cache misses. (I.e. with 1000 calls to namei, 950 of them name-cache hits, 30 dir-cache hits, the percentage will be calculated as 3% (30/1000), while it actually should come out as 60% (30/(1000-950)) ...) Fix appended! Regards, STefan Index: vmstat.c =================================================================== RCS file: /usr/cvs/src/usr.bin/systat/vmstat.c,v retrieving revision 1.50 diff -u -3 -r1.50 vmstat.c --- vmstat.c 12 Dec 2001 00:13:37 -0000 1.50 +++ vmstat.c 21 Jan 2002 00:03:30 -0000 @@ -565,7 +565,8 @@ 100.0 / nz(s.nchcount), NAMEIROW + 2, NAMEICOL + 19, 4, 0, 1); putint(nchtotal.ncs_pass2, NAMEIROW + 2, NAMEICOL + 23, 9); - putfloat(nchtotal.ncs_pass2 * 100.0 / nz(s.nchcount), + putfloat(nchtotal.ncs_pass2 * + 100.0 / nz(s.nchcount-(nchtotal.ncs_goodhits+nchtotal.ncs_neghits)), NAMEIROW + 2, NAMEICOL + 33, 4, 0, 1); #undef nz } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message