Weird vmstat -s stats

Lowell Gilbert freebsd-stable-local at be-well.no-ip.com
Sun Jul 6 08:45:12 PDT 2003


Farid Hajji <me at farid-hajji.de> writes:

> > > "vmstat -s" shows on one of my boxes (uptime: 26 days):
> > >
> > > -1597015721 total name lookups
> > >           cache hits (101% pos + 0% neg) system 0% per-directory
> > >           deletions 0%, falsehits 0%, toolong 0%
> > >
> > > Weird. I'll have to cvsup again and hope this has been fixed :)
> >
> > I'm not seeing it on an up-to-date -STABLE.  Of course, that doesn't
> > mean much, because it looks like a counter wraparound.
> 
> Of course it's a wraparound.

The total count is a wraparound, but the positive cache hit count
still looks funny.

>                              I was not able to reproduce this
> condition on newer -STABLE. It takes some weeks of uptime
> and heavy use to reach this stage, unless you happen to know
> how to increment the counter with a test program (I don't
> know how).

You'd have to put in an extra kernel interface for that; the ability
to zero the structure would be (slightly) more useful.

> Shouldn't such counters be at least 64 bit wide?

They are, on most platforms.  You can't do that on an i386, though.
At least, not without opening up worse problems.


More information about the freebsd-stable mailing list