Re: CVS commit: src/sbin/ifconfig

[email protected] (John Nemeth)
Newsgroups gmane.os.netbsd.devel.general
Message-ID <[email protected]>
On Jul 29,  3:25am, 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 <[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?
} > Or root?
} 
} Because how can SNMP take care of it?
} 
} If you can come up with a workable alternative (even in concept), I'd like
} to hear it.

     The way I handle it in my scripts is to poll the device every five
minutes.  If a counter value is less then the preceeding counter value,
then I check to see if the preceeding value was within approximately
200,000,000 of the wrap point then I assumed that it wrapped;
otherwise, I assume that it was reset.  This heuristic might not be
completely according to the protocol spec, but I find that it works for
me and produces very accurate stats (there may be a bit of lossage when
a counter is reset, which I could reduce by polling more frequently).

}-- End of excerpt from Bill Studenmund
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.