[Gllug] Zeroing IP counters with fedora core 3

Nix nix at esperi.org.uk
Tue Nov 29 10:44:53 UTC 2005


On Mon, 28 Nov 2005, Russell Howe announced authoritatively:
> On Wed, Nov 23, 2005 at 01:49:49PM +0000, mfaz001-foo at yahoo.com wrote:
>> Folks, 
>> 
>> I'm trying to zero the IP stats reportable with
>> ifconfig & netstat and friends but can't find where to
>> do this. Stopping the network don't cut da mustard. 
>> 
>> Anyone know the magic juju to do this? 
> 
> If you use rrdtool, it has a COUNTER type which is for just this kind of
> situation. It handles resets to 0 caused by 32bit or 64bit wraparounds,
> too.
> 
> Otherwise, I guess you might be stuck. You could always rip the code out
> of rrdtool which handles the COUNTER type.. it probably wouldn't be too
> hard.

Ah, so the idea is to let the kernel counters keep incrementing, and
print the absolute difference between them and some zero value? Yeah,
that would work (it's a classic ring buffer management trick).

-- 
`Y'know, London's nice at this time of year. If you like your cities
 freezing cold and full of surly gits.' --- David Damerell

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list