Date: Mon, 21 Jan 2002 01:04:58 +0100 From: Stefan Esser <se@freebsd.org> To: Peter Jeremy <peter.jeremy@alcatel.com.au> Cc: freebsd-audit@FreeBSD.ORG, Stefan Esser <se@freebsd.org> Subject: Re: systat(1) bugs Message-ID: <20020121000458.GA95702@StefanEsser.FreeBSD.org> In-Reply-To: <20020121093532.D72285@gsmx07.alcatel.com.au> References: <20020121093532.D72285@gsmx07.alcatel.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-01-21 09:35 +1100, Peter Jeremy <peter.jeremy@alcatel.com.au> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020121000458.GA95702>