Subject: Re: bin/21078: patch to allow ifconfig clear interface stats
To: David Laight <david@l8s.co.uk>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-bugs
Date: 04/09/2003 22:28:41
On Wed, Apr 09, 2003 at 08:29:15PM +0100, David Laight wrote:
> > >Synopsis:       there is no way to clear interface stats (packet in/out) with ifconfig
> 
> IMHO clearing the stats shouldn't be allowed.
> The problems arise when there are multiple bits of code that are
> clearing the stats in order to determine the whether there have been
> any recent errors (etc).
> 
> It is much better for the stats gathering code to save the old values
> and do the subtractions - that way multple uses don't tread on each
> other.

Sure, clearing the stats can cause such problems. But I don't see it as a
reason to not allow doing it (if someone wants to shoot himself in the
foot, it's his problem).
I would have been happy to have this feature a number of times. Sometimes
the only stats gathering software running is a
netstat -i; sleep 10; netstat -i
and in this case it's much easier to deal with small numbers.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--