Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
systat(1) vmstat sometimes show incorrect namei proc cache percent value
Hi,
I do quite often see incorrect namei proc cache percent value on
`systat -w 1 vm' output on my amd64 workstation ... Such as:
Namei Sys-cache Proc-cache
Calls hits % hits %
158 ****
The problem is that displayed proc cache values are not taken into
account in the total count; but later, the percentage is calculated
with it.
The attached patch adds the ncs_pass2 field to the total calls
value. Not sure about ncs_2passes ...
--
Nicolas Joly
Biological Software and Databanks.
Institut Pasteur, Paris.
Index: usr.bin/systat/vmstat.c
===================================================================
RCS file: /cvsroot/src/usr.bin/systat/vmstat.c,v
retrieving revision 1.71
diff -u -p -r1.71 vmstat.c
--- usr.bin/systat/vmstat.c 13 Jul 2008 20:07:48 -0000 1.71
+++ usr.bin/systat/vmstat.c 23 Oct 2008 09:44:56 -0000
@@ -532,7 +532,7 @@ showvmstat(void)
Z(s, s1, ncs_goodhits); Z(s, s1, ncs_badhits); Z(s, s1, ncs_miss);
Z(s, s1, ncs_long); Z(s, s1, ncs_pass2); Z(s, s1, ncs_2passes);
s.nchcount = s.nchstats.ncs_goodhits + s.nchstats.ncs_badhits +
- s.nchstats.ncs_miss + s.nchstats.ncs_long;
+ s.nchstats.ncs_miss + s.nchstats.ncs_long + s.nchstats.ncs_pass2;
if (display_mode == TIME)
s1.nchcount = s.nchcount;
Home |
Main Index |
Thread Index |
Old Index