From owner-freebsd-isp Tue Jun 18 16: 4:21 2002 Delivered-To: freebsd-isp@freebsd.org Received: from munkboxen.mine.nu (213-152-51-194.dsl.eclipse.net.uk [213.152.51.194]) by hub.freebsd.org (Postfix) with ESMTP id 4D52937B40B for ; Tue, 18 Jun 2002 16:04:06 -0700 (PDT) Received: (from munk@localhost) by munkboxen.mine.nu (8.11.6/8.11.6) id g5IN2SR05676 for freebsd-isp@FreeBSD.ORG; Wed, 19 Jun 2002 00:02:28 +0100 (BST) (envelope-from munk) Date: Wed, 19 Jun 2002 00:02:27 +0100 From: Jez Hancock To: freebsd-isp@FreeBSD.ORG Subject: Re: Bandwidth billing and measurement scripts Message-ID: <20020619000227.A5671@munkboxen.mine.nu> Mail-Followup-To: freebsd-isp@FreeBSD.ORG References: <3D0F2327.FDF97290@mipk-kspu.kharkov.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3D0F2327.FDF97290@mipk-kspu.kharkov.ua>; from artem@mipk-kspu.kharkov.ua on Tue, Jun 18, 2002 at 03:10:15PM +0300 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 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