Subject: Re: CVS commit: src/sbin/ifconfig
To: Martin Husemann <martin@duskware.de>
From: Greg A. Woods <woods@weird.com>
List: tech-misc
Date: 04/13/2003 14:30:46
[ 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;            <g.a.woods@ieee.org>;           <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>