Re: CVS commit: src/sbin/ifconfig
"Greg A. Woods" <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.general |
|---|---|
| Organization | Planix, Inc.; Toronto, Ontario; Canada |
| Message-ID | <[email protected]> |
[ On Saturday, April 12, 2003 at 23:53:16 (+0200), Martin Husemann wrote: ] > Subject: Re: CVS commit: src/sbin/ifconfig > > On Sat, Apr 12, 2003 at 01:30:32PM -0700, Bill Studenmund wrote: > > > > > Havard Eidnes <[email protected]> writes: > > > > > > > > If this does what I think it does (after browsing the code, I think it > > > > does), zeroing the packet statistics will break the monotonous > > > > increase of counters restriction imposed on SNMP agents > > > > So what do other *BSDs do? I figure we need to come up with a new > > read-stats ioctl that will get the monotonic value. What name(s) are in > > use now? > > Why bloat the kernel more instead of having the SNMP daemon take care of it? That's simply not possible (unless maybe you moved the SNMP Agent right into the kernel, but then you'd still end up just doing something very much like what Bill suggested anyway, and of course you'd also have way more bloat). No, this is something that must be done in the kernel, and the way Bill has proposed it there's no extra CPU overhead in any place that matters (i.e. there's still only one set of counters that get incremented). The only real question is in deciding what to do with the API for reading the counters. > The counters will wrap anyway, if not reset. Why should root (who might know > this machine is not running any SNMP stuff) not be allowed to reset this > counters? Folks using SNMP know how to deal with that part, i.e. normal wrapping over time (unless they make the mistake of using a sample time period so long that the counter can wrap multiple times during that time period). -- Greg A. Woods +1 416 218-0098; <[email protected]>; <[email protected]> Planix, Inc. <[email protected]>; VE3TCP; Secrets of the Weird <[email protected]>