Re: Count traffic
Greetings!
On Wed, 13 Aug 2003 10:59:22 +0200 Teun Vink <teun@moonblade.net> wrote:
> > > I'm searching a solution to count in- and outgoing traffic for
> > > each virtual user (domain). Our boxes are running Apache, Proftpd
> > > and qmail. Does anybody know some good working GPLed software/tool
> > > to do one of these tasks.
> And how would that work with _virtual_ servers?
Evaluate the Apache logs? It's quite easy with a little bit of scripting
- the number of (outgoing) bytes usually is the last field. Depending on
your virtual domain setup you either have to simply add the according
field(usually #9, the last one) - else set up logging to include the
virtual host's name and add dependend on that.
I'm not sure on how easy "just accounting" that is with prepackaged log
analyzers. As for incoming you won't have proper metrics in the logs
(correction please, if I'ver overseen something) - to get an approximate
weighted accounting you probably should go with something like
in-bytes per VHost = i-bytes total / requests total * requests VHost
Bye
Volker Tanger
Reply to: