Use netstat -brn to get byte counts on the individual IPs. Use netstat -bi to get byte counts per interface.
The rest is a whole lot of perl black magic (or php or awk or <insert_favorite_weapon_here>). Keep in mind, at least on my OpenBSD i386, the counters all hit the 2^32 ceiling, so watch out for negative numbers when you code your math. Best of luck! jeff -----Original Message----- From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> on behalf of "Marcin Pacyna" <[EMAIL PROTECTED]> Sent: Friday, May 17, 2002 10:05 AM To: "IPFilter Mailing List" <[EMAIL PROTECTED]> Subject: ip accounting - bridging, sql, graphs I was wondering if anyone is doing ip accounting with OpenBSD, IPF on a bridged firewall - maybe something with nice graphs (that customers could look at) and stats logged into some kind of SQL engine. Currently I'm dumping accounting (ipfstat -ai) data into a file which is shipped off (ssh) to another box which generates graphs of traffic using MRTG. However we're now looking at some co-location customers whom we'll have to charge for bandwidth - either by the amount of data they transfer in a month or the avg (95 percentile) bandwidth they use and while MRTG is nice - it's not suitable for billing. I'm currently trying to use ipacct package just to get some numbers but it doesn't seem to handle bridging stats (ie. no 'out' stats - just 'in' on different interfaces) so I'm trying to modify it but my perl knowledge is very basic. Is anyone doing anything like that? Regards, Marcin Pacyna
