Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jun 2002 16:59:32 -0700 (PDT)
From:      Mark Hartley <mark@work.drapple.com>
To:        Jez Hancock <jez.hancock@munkboxen.mine.nu>
Cc:        freebsd-isp@FreeBSD.ORG
Subject:   Re: Bandwidth billing and measurement scripts
Message-ID:  <XFMail.020618165932.mark@work.drapple.com>
In-Reply-To: <20020619000227.A5671@munkboxen.mine.nu>

next in thread | previous in thread | raw e-mail | index | archive | help

On 18-Jun-02 Jez Hancock wrote:
> On Tue, Jun 18, 2002 at 03:10:15PM +0300, Artyom V. Viklenko wrote:
>> Here is some example from my external router.
>> In order to count traffic amount on external interface to provider
>> I place these rules:
>> 
>> ipfw add 2000 count ip from any to any in recv ed1
>> ipfw add 2001 count ip from any to any out xmit ed1
>> 
>> 'ipfw show 2000 && ipfw show 2001' produce this output:
>> 
>> 02000 3226667 1630960688 count ip from any to any in recv ed1
>> 02001 3127782  917406180 count ip from any to any out xmit ed1
>> 
>> Second and third fields are packet and byte counters.
>> You can use them in any scripting language ( awk, perl, etc )
>> to make your billing actions.
> <snip>
> How would you determine how much bandwidth has been used by users
> accessing an individual domain a name-based
> vhosting apache configuration (ie in the case using ipfw to log traffic is
> not possible on a one-domain-one-ip basis).
> 
> TIA

I have been using analog (/usr/ports/www/analog) to analyze the apache logfiles
in this instance. It isn't 100% accurate due to headers & such, but analog does
give you some reasonably close transfer numbers you can work with.  Add to that
your analysis of your ftp transfer logs (for their uploading stuff to their
site), and your analysis (/usr/ports/mail/sma) of the sendmail logs, you can get
a reasonable number for each client.  I'm doing this, but I do not have it all
scripted (yet).  I also don't have a really good ftp log analysis app. (any
suggestions?)



Mark.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.020618165932.mark>