From owner-freebsd-net@FreeBSD.ORG Thu Jun 26 01:11:13 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB6F437B401 for ; Thu, 26 Jun 2003 01:11:12 -0700 (PDT) Received: from 203-134-120-146.cust.mel.iprimus.net.au (203-134-120-146.cust.mel.iprimus.net.au [203.134.120.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3306143FE5 for ; Thu, 26 Jun 2003 01:11:11 -0700 (PDT) (envelope-from jon.newson@sdrct.com) Received: (from smap@localhost)h5Q8B8532236 for ; Thu, 26 Jun 2003 18:11:08 +1000 (EST) (envelope-from jon.newson@sdrct.com) X-Authentication-Warning: outgoing-a.fw.act.domain: smap set sender to using -f Received: from if-outdmz.fw.act.domain(192.168.130.1) by outgoing-a.fw.act.domain via smap (V2.1) id xma032230; Thu, 26 Jun 03 18:10:51 +1000 Received: (from amavis@localhost) by mailfwd.au.adcomtech.net (8.11.1/8.11.1) id h5Q8Apu69442 for net@freebsd.org; Thu, 26 Jun 2003 18:10:51 +1000 (EST) Received: from ntserver.act.domain (ntserver [192.168.1.1]) h5Q8AiV69427; Thu, 26 Jun 2003 18:10:44 +1000 (EST) Received: by ntserver.act.domain with Internet Mail Service (5.5.2650.21) id ; Thu, 26 Jun 2003 18:10:44 +1000 Message-ID: <1379FE1A8B3ED71188B8009027732E1A02442D@ntserver.act.domain> From: Jon Newson To: Adam Date: Thu, 26 Jun 2003 18:10:43 +1000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: by AMaViS perl-11 cc: Lars Eggert cc: net@freebsd.org Subject: RE: Bandwidth monitoring X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2003 08:11:13 -0000 Adam, i recommend using ipa, its part of the ports directory, latest is 1.3.4 in short you add an ipf rule to 'count' traffic on your given interface (setup individual rules for the main ports such as 80/tcp and 25/tcp). The ipa config file then references those count rules to keep a database of the stats, via a cron job. Cheers, Jon Newson - Systems Administrator SDR Technologies jon.newson@sdrct.com -----Original Message----- From: Ian Freislich [mailto:ianf@za.uu.net] Sent: Thursday, June 26, 2003 5:54 PM To: Lars Eggert Cc: Adam; net@freebsd.org Subject: Re: Bandwidth monitoring Lars Eggert wrote: > Adam wrote: > > My ISP is placing strict restrictions on how much I can transfer each > > month, with high penalties for exceeding their limits. However, they > > don't provide any way for their customer's to check to see how much > > they've transferred, so we end up transferring far less than what we are > > allowed, just to make sure we avoid paying the fines for going over the > > limit. > > > > So, what I need to do is find a way to monitor my total bandwidth > > through my external NIC. My gateway is running FreeBSD 4.8 with > > ipf+ipnat. > > > > I *don't* need anything fancy. All I need is to be able to check at any > > time how much I've transferred since the first of the month. What's the > > easiest way to set up something like this? I know there are fancy > > solutions with graphs with usage stats and such, but that's not what I'm > > after. > > What's wrong with netstat? Won't that count all the ethernet frames and local ethernet broadcasts which probably won't be billed for? We had this problem using router (ethernet) interface counters to measure traffic in our hosting center. The trouble is that any traffic between servers on the same physical network is counted even though it isn't routed and shouldn't be billed for. It's pretty unfair of your ISP to charge you for useage without providing any mechanism for you to keep tabs on what they're measuring throughout the month. I would suggest that you find out exacly how they measure your traffic useage. ie do they measure only packets that were switched by their router or just any and every single byte that their router's ethernet interface sees. The first is IMHO much more fair than the second because trafic local to your IP network won't be charged. I can give you a hand setting up a graph like: http://www.digs.iafrica.com/20030520_00h00-20030620_00h00.gif This is _really_ simple to do and if you have managers, they will really like the green changes to red when you go over the limit. Ian _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"