Re: Problems with nfsstat and dynamic OID

1999-02-23 Thread Bruce Evans
>> >I fixed this a while back to use sysctlbyname, as it should have been >> >done. Bruce subsequently backed it out (bad idea, IMO). >> >> You only worked around the previous breakage of vfs sysctls for the >> statically configured case. The dynamically configured case was more >> fundamentall

Re: Problems with nfsstat and dynamic OID

1999-02-23 Thread Doug Rabson
On Mon, 22 Feb 1999, Bruce Evans wrote: > >I fixed this a while back to use sysctlbyname, as it should have been > >done. Bruce subsequently backed it out (bad idea, IMO). > > You only worked around the previous breakage of vfs sysctls for the > statically configured case. The dynamically conf

Re: Problems with nfsstat and dynamic OID

1999-02-21 Thread Bruce Evans
>I fixed this a while back to use sysctlbyname, as it should have been >done. Bruce subsequently backed it out (bad idea, IMO). You only worked around the previous breakage of vfs sysctls for the statically configured case. The dynamically configured case was more fundamentally broken (sysctls

Re: Problems with nfsstat and dynamic OID

1999-02-21 Thread Mike Smith
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

Re: Problems with nfsstat and dynamic OID

1999-02-21 Thread Roman V. Palagin
On Sun, 21 Feb 1999, Doug Rabson wrote: > > Oh. Thats nasty. I don't want to allocate special oids for 'privileged' > nodes. I think the userland code should use sysctlbyname() instead. > This patch seems to fix it for me: Works for me too. This problem exists not only in -current, i believe.

Re: Problems with nfsstat and dynamic OID

1999-02-21 Thread Poul-Henning Kamp
In message , Do ug Rabson writes: >Since >sysctlbyname exists and is obviously a better mechanism for reading the >variable (based on code complexity), then why not use it? I support this. It was the intention of sysctlbyname() to minimize the use of "well-known-OIDs" as much as possible. -- Po

Re: Problems with nfsstat and dynamic OID

1999-02-21 Thread Doug Rabson
On Mon, 22 Feb 1999, Bruce Evans wrote: > >>The old interface is the standard one (although the above code shows how > >>inconvenient it is). mountd uses it too. > > > >There is nothing "less standard" about sysctlbyname to my knowledge... > > sysctl() is in Linux (starting in 2.1.x), BSD4.4, Ne

Re: Problems with nfsstat and dynamic OID

1999-02-21 Thread Bruce Evans
>>The old interface is the standard one (although the above code shows how >>inconvenient it is). mountd uses it too. > >There is nothing "less standard" about sysctlbyname to my knowledge... sysctl() is in Linux (starting in 2.1.x), BSD4.4, NetBSD, OpenBSD, etc. sysctlbyname() is in FreeBSD (sta

Re: Problems with nfsstat and dynamic OID

1999-02-21 Thread Poul-Henning Kamp
In message <199902211232.xaa05...@godzilla.zeta.org.au>, Bruce Evans writes: >>Index: nfsstat.c >>=== >>RCS file: /home/ncvs/src/usr.bin/nfsstat/nfsstat.c,v >>retrieving revision 1.12 >>diff -u -r1.12 nfsstat.c >>--- nfsstat.c 1998/10

Re: Problems with nfsstat and dynamic OID

1999-02-21 Thread Bruce Evans
>> Now that it is possible to change the sysctl tree at runtime, the changes >> are not actually (completely) made for vfs sysctls. Special code for >> making "impossible" changes for vfs sysctls went away. > >Oh. Thats nasty. I don't want to allocate special oids for 'privileged' >nodes. I thi

Re: Problems with nfsstat and dynamic OID

1999-02-21 Thread Doug Rabson
On Sun, 21 Feb 1999, Bruce Evans wrote: > >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]

Re: Problems with nfsstat and dynamic OID

1999-02-21 Thread Doug Rabson
On Sun, 21 Feb 1999, Bruce Evans wrote: > >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]

Re: Problems with nfsstat and dynamic OID

1999-02-21 Thread Bruce Evans
>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 getvfsbyna

Problems with nfsstat and dynamic OID

1999-02-20 Thread Roman V. Palagin
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).