Always-0 NFS statistics

Alan Somers asomers at freebsd.org
Fri Oct 23 01:55:46 UTC 2020


On Thu, Oct 22, 2020 at 7:46 PM Rick Macklem <rmacklem at uoguelph.ca> wrote:

> Alan Somers wrote:
> >It looks to me like three of the server statistics published by nfsstat
> are
> >always 0.  At least, cscope can't find any location in the kernel that
> sets
> >these variables.  Are they legitimately always zero in FreeBSD's
> >implementation of NFS, or are they reserved for future features, or is
> this
> >a mistake?  The stats are:
> >
> >nfsstat's name    kernel name
> >Retfailed         srv_errs
> >Faults            srvrpc_errs
> >Idem              srvcache_idemdonehits
> I believe these are left over from when the code was originally written
> for OpenBSD2.6, which did not have a separate kernel RPC, where the
> NFS code did the RPC calls.
>
> I suppose they should have been deleted from the FreeBSD port once
> it was incorporated into FreeBSD using the kernel RPC, but they were
> not.
>
> Revising the nfsstats structure yet again is a bother.
> I suppose you could modify nfsstats.c so that it never displays these
> fields. I doubt that would be considered a POLA violation.
>
> rick
>

Yep, removing them from nfsstat sounds like the right thing to do given
that they'll never be used again.
-Alan


More information about the freebsd-fs mailing list