From owner-freebsd-isp Wed Jun 19 0:56:39 2002 Delivered-To: freebsd-isp@freebsd.org Received: from smidge.enta.net (smidge.enta.net [195.74.96.108]) by hub.freebsd.org (Postfix) with ESMTP id 659C337B43E for ; Wed, 19 Jun 2002 00:56:18 -0700 (PDT) Received: from steve2 (steve2.enta.net [195.74.96.98]) by smidge.enta.net (8.11.6/8.11.6) with SMTP id g5J7tSc40470 for ; Wed, 19 Jun 2002 08:55:29 +0100 (BST) (envelope-from steve@enta.net) Message-ID: <006201c21766$ca492710$62604ac3@steve2> From: "Steve Lalonde" To: References: <3D0F2327.FDF97290@mipk-kspu.kharkov.ua> <20020619000227.A5671@munkboxen.mine.nu> Subject: Re: Bandwidth billing and measurement scripts Date: Wed, 19 Jun 2002 08:56:15 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org We are using mod_log_mysql and a simple script to get the bytes transfered you need a fast DB server but i have this working for over 10,000,000 hits a day. Steve Lalonde Chief Technical Officer Entanet International Ltd http://www.enta.net/ *********************************************************************** IMPORTANT: DISCLAIMER NOTICE This email (and any attachment thereto) is confidential, and may be legally privileged, and is for the intended recipient only. Access, disclosure, copying, distribution or reliance on any of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and notify the sender. Any views expressed in this e-mail are those of the individual sender, not those of the company unless endorsed by a Director of Entanet International Ltd. *********************************************************************** ----- Original Message ----- From: "Jez Hancock" To: Sent: Wednesday, June 19, 2002 12:02 AM Subject: Re: Bandwidth billing and measurement scripts > 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. > > 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 > -- > Nobody ever got fired for choosing Microsoft, > but Nobody ever looked stupid for choosing FreeBSD... > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-isp" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message