Tags:

When I first started at the Bandwith Barn, the traffic accounting that such an environment required just wasn't available off-the-shelf or in the open source world.  I've often been asked for the hacking combination of scripts and pmacct that maintain the Bandwidth Barn traffic system - which includes "buying" more monthly traffic, setting traffic limits per month per person, up-to-date graphs of usage per protocol and per client available to each company in the Barn, and months of historical data in case of queries or complaints about the billing.

Looks like ulogd, some iptables rules, and a few simple cronned SQL scripts make this a lot easier these days, thanks to this post about ulogd for bandwidth accounting by Stefano.

1 Responses

  1. Stefano RiveraApril 07, 2008 at 04:11 PM.

    I don't know how the efficiency of NetFlow compares to ulogd. But ulogd logs every packet at as a row in a table. You'd quickly want to reduce this to less.

    IIRC NetFlow only reports on completed flows. If you want accurate accounting without losing too much information, you'd want to do something similar.

    For high-traffic use, you probably want ulog -> raw SQL table -> netflow-type table.

    In my case, I reduce it to one row of "user, type, bandwidth" per day.

Have your say

The text area above accepts Post Markup, a BBCode work-alike.

[b]foo[/b]: foo
[i]foo[/i]: foo
[link]http://nxsy.org/[/link]: http://nxsy.org/ [nxsy.org]
[link http://nxsy.org/]Neil[/link]: Neil [nxsy.org]
        

You can also use:

[code python]
import foo
[/code]