# Per-host bandwidth usage logging



## Pushrod (Jul 31, 2012)

My ISP is cranking up the over use charge from a max of $50 per month to $100. I have three other people in the house, and all of us are heavy users. As such, it is very likely we will be getting the $100 over charge quite often.

So, I want to log the usage with my FreeBSD firewall that connects all of us to the internet. I want to do it by MAC address so that it is rock solid. Is there an existing solution that I can use, or do I need to make one?

The firewall has 8.2-prerelease on it, and I use PF+ALTQ. I could upgrade to FreeBSD 9 if I must.


----------



## redw0lfx (Jul 31, 2012)

We use net-mgmt/pmacct for not only getting bandwidth usage (speed) but also over all bandwidth.  The values given by pmacct are fed to net-mgmt/cacti for graphing.

You could bypass the cacti part and just use databases/rrdtool to store the data in an rra file which you can then query and generate graphs from, etc.  Or go a simpler route and at the end of the month, grab the current counters save them to a file, and then reset the counters.

Take a look at this blog page for more info on setting up pmacct.


----------



## SirDice (Aug 1, 2012)

Cacti should work great. Another tool, takes a bit more hands-on configuring, is net-mgmt/mrtg. You may also want to have a look at the various NetFlow tools like net/pfflowd for even more fine grained monitoring.

Oh, and upgrade your system to 8.3 (no need for 9.0 yet). FreeBSD 8.2 went End-of-Life yesterday.

http://www.freebsd.org/security/#unsup


----------

