Subject: RE: ipf counting and rrdtool
To: Gwilym Evans <meatgroup@iprimus.com.au>
From: Greg A. Woods <woods@weird.com>
List: netbsd-users
Date: 07/12/2001 18:01:33
[ On Thursday, July 12, 2001 at 16:12:06 (+1000), Gwilym Evans wrote: ]
> Subject: RE: ipf counting and rrdtool
>
> > 	/etc/rc.d/ipfilter reload; ipfstat -aio | ipaccumulate
> 
> I'm actually doing something similar to this already, except for the
> accumulation bit. I _was_ going to add the rrd setup to the beginning of
> this, but after some thinking and advice I'll stay clear of rrd in favour of
> writing a custom script, time to learn pearl I guess :)

You might want to look at Ruby, Python, or even just plain /bin/sh & nawk

I'd avoid gawk and mawk as they both corrupt large integers into floats,
and you're likely going to have to deal with large integers here!

	$ nawk 'END {print 4294967296 + 4294967296}' < /dev/null
	8589934592
	$ gawk 'END {print 4294967296 + 4294967296}' < /dev/null
	8.58993e+09
	$ mawk 'END {print 4294967296 + 4294967296}' < /dev/null 
	8.58993e+09

Which you choose should be dictated by whatever previous programming
experience you have.  If you don't already know and like perl I'd avoid
it like the plague if I were you!  ;-)  Personally I'd choose ruby if I
didn't think sh+awk would be simple enough....

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>     <woods@robohack.ca>
Planix, Inc. <woods@planix.com>;   Secrets of the Weird <woods@weird.com>