I fixed this a while back to use sysctlbyname, as it should have been done. Bruce subsequently backed it out (bad idea, IMO).
You should file a PR or otherwise petition b...@freebsd.org to un-revert his change. > Hello! Five minutes ago I type 'nfsstat' and got: > > nfsstat: sysctl: No such file or directory > > I take a look at the source and that's what I found: > Nfsstat gets statistic via sysctl(3). name[0]=CTL_VFS, name[2]=NFS_NFSSTATS, > but name[1] has a value of vfc.vfc_typenum, returned by getvfsbyname(3). > And it is very bad, 'cause vfc_typenum contains fs type number assigned > by kernel, not sysctl OID! As we can see in nfs_vfsops.c NFS sysctl node > declared with OID_AUTO (on my system it becomes 119, not 4 as returned by > getvfsbyname). > > Operating system is 4.0-CURRENT as of 1999/02/20. What you think? > > p.s. Sorry for bad English :( > > ------------------------------------------------------------------------- > Roman V. Palagin | RVP1-6BONE | Just because you're paranoid > Network Administrator | RP40-RIPE | doesn't mean they AREN'T after you > > > > To Unsubscribe: send mail to majord...@freebsd.org > with "unsubscribe freebsd-current" in the body of the message > -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ m...@smith.net.au \\ The race is long, and in the \\ msm...@freebsd.org \\ end it's only with yourself. \\ msm...@cdrom.com To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-current" in the body of the message