Bandwidth Metering
Hi,
How do you meter the amount of bandwidth a user has consumed (as webhosting companies do) under linux? I have searched everywhere, but have been unable to find a solution. Apologies if this is the wrong forum.
Thanks,
Patrick
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hello Patrick
I personally use ipfm (http://freshmeat.net/projects/ipfm/) to do the traffic logging, and then I got a home brewed perl script running in cron every 5 min. to parse the accumulated data and create/update a RRD
(http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/) base for each host. When you got the RRD bases you can output a nice graph on-the-fly from you webserver or run the graphing procedure from cron. If you like I could send you the ipfm config and the perl script.
There might be other "projects" to look at, like ntop and etc. Try searching for it on freshmeat.net.
Note: This solution is primarily for general host traffic accumulation based on a subnet. The stats are collected via libpcap and can be done in promiscuous mode. This is not for website stats, for that you need to parse your webserver log files. But I guess you already know that.
Daniel Frederiksen, Cyberdoc.dk
Quoted 10 lines · Patrick Coleman
Hi,
How do you meter the amount of bandwidth a user has consumed (as webhosting companies do) under linux? I have searched everywhere, but have been unable to find a solution. Apologies if this is the wrong forum.
Thanks,
Patrick
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Tue, 28 Sep 2004 16:17:00 +0200, Daniel Frederiksen wrote
Quoted 5 lines
Note: This solution is primarily for general host traffic accumulation based on a subnet. The stats are collected via libpcap and can be done in promiscuous mode. This is not for website stats,
for that you need to parse your webserver log files. But I guess
you already know that.
This is not good solution cause of high load where you account many nets and/or hosts. In my opinion ACCOUNT/account from netfilter.org patch-o-matic-ng are the best solutions for mass accounting.
Bests,
Tomasz Chilinski
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 1 line · Tomasz Chilinski
This is not good solution cause of high load where you account many
nets
Quoted 5 lines
and/or hosts. In my opinion ACCOUNT/account from netfilter.org patch-o-matic-ng are the best solutions for mass accounting.
Bests,
Tomasz Chilinski
Perhaps your right, but I use it on a bridge in front of a complete subnet, so at the time the easiest sollution was to log via libpcap. Of course it depends on how many hosts/subnets you are logging and the available CPU for it. My suggestion might be an easier sollution for Patrick, in that he does not need to patch his kernel and iptables for it, if his distro does not have ACCOUNT/account build in.
Daniel Frederiksen, Cyberdoc.dk
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/