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 Sunday, April 13, 2003 at 12:04:04 (+0200), Martin Husemann wrote: ] > Subject: Re: CVS commit: src/sbin/ifconfig > > I would have thought that a SNMP daemon could monitor the routing socket and > we could add a "counter zeroed, last value was: XXX" message. But aparently > I don't understand enough about the major complexity of a snmp daemon. SNMP is a many-to-many client/server protocol. Not only is your idea not scalable, it also leads to the problem that each agent (client) ends up with its own unique view of what it thinks the kernel has actually done and it's way too easy for this view to get out of sync with reality (especially since SNMP is still very often used via unreliable datagrams). So, we know that the basic counters need to be monotonic for tools like SNMP agents which just present them to remote viewers where they might be recorded or used to calculate running deltas, etc. The right thing to do is never zero the actual counters and for those who want small numbers to just show them the deltas from more recent "start" times. However even Bill's idea of having a way to store counter value at a given start time in one other kernel variable and providing another ioctl() to retrieve the delta of the current counter value from that stored value is rather inelegant when you consider what John said about multiple administrators who might need different start times. It is best to let the tools keep track of the starting position for each instance and then each person can set their own start times, or even multiple start times, and everyone is happy! -- Greg A. Woods +1 416 218-0098; <[email protected]>; <[email protected]> Planix, Inc. <[email protected]>; VE3TCP; Secrets of the Weird <[email protected]>