Subject: Re: CVS commit: src/sbin/ifconfig
To: Bill Studenmund <wrstuden@netbsd.org>
From: Matt Thomas <matt@3am-software.com>
List: tech-misc
Date: 04/12/2003 17:33:14
At 03:18 PM 4/12/2003, Bill Studenmund wrote:
>On Sat, 12 Apr 2003, Martin Husemann wrote:
>
> > On Sat, Apr 12, 2003 at 01:30:32PM -0700, Bill Studenmund wrote:
> > > > Havard Eidnes <he@netbsd.org> 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?
> > Or root?
>
>Because how can SNMP take care of it?

I don't see the problem.  If you run SNMP, don't zero the counters.  If you
don't run SNMP, who cares?

Note that this problem also exists for interfaces that are dynamically
created and destroyed (USB Ethernet).

RFC2863 contains a solution to this problem:

To address this, a new object, ifCounterDiscontinuityTime,
has been defined to record the time of the last discontinuity
in an interface's counters.

Sounds like we need to add that if_data and make SIOCZIFDATA set it.
It's then up to snmpd to monitor that too.

-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message