From owner-freebsd-current Sun Feb 21 23:18:10 1999 Delivered-To: freebsd-current@freebsd.org Received: from dingo.cdrom.com (castles184.castles.com [208.214.165.184]) by hub.freebsd.org (Postfix) with ESMTP id D4A9310F33 for ; Sun, 21 Feb 1999 23:18:07 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (LOCALHOST [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id WAA02233; Sun, 21 Feb 1999 22:58:38 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199902220658.WAA02233@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: "Roman V. Palagin" Cc: current@FreeBSD.ORG Subject: Re: Problems with nfsstat and dynamic OID In-reply-to: Your message of "Sat, 20 Feb 1999 22:32:42 +0300." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 21 Feb 1999 22:58:37 -0800 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 bde@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 majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message