Bandwidth monitor for a server with many virtual hosts

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Wed Aug 15 19:10:25 UTC 2007


Lennart Sorensen wrote:
> On Wed, Aug 15, 2007 at 01:46:11PM -0400, Madison Kelly wrote:
>>   Until now, I have not worried about how much bandwidth various 
>> customers whom we host use. Now that our number of clients grows though, 
>> I need to start tracking who uses how much bandwidth.
>>
>>   What do you guys here use to log bandwidth usage? Our clients use 
>> mail, web and can copy data to/from the server via scp/rsync. I suspect 
>> I could hack up something using TCP dump, but I really doubt I could 
>> come up with something elegant and efficient. :)
> 
> iptables can count packets/bytes for every rule.  So if you can setup a
> rule for each virtual IP or whatever else you can define to identify
> each user, then you can keep track of those numbers.  There are packages
> that configure and monitor iptables to generate usage reports already,
> although I can't seem to recall the name of the one I used in the past.

Heh, what is funny is that someone here at the office was talking about 
using virtual machines. I was hesitant though because I didn't want each 
client to have to have their own IP. That meant I would need to setup 
several port forwards for each client's virtual machine. I never even 
thought about using iptables for logging!

<head's desk>

Thanks, another good idea to look at!

Madi
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list