From owner-freebsd-stable Sat Nov 4 8:21:48 2000 Delivered-To: freebsd-stable@freebsd.org Received: from gndrsh.dnsmgr.net (GndRsh.dnsmgr.net [198.145.92.4]) by hub.freebsd.org (Postfix) with ESMTP id CD18D37B4C5 for ; Sat, 4 Nov 2000 08:21:43 -0800 (PST) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.9.3/8.9.3) id IAA76740; Sat, 4 Nov 2000 08:21:20 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <200011041621.IAA76740@gndrsh.dnsmgr.net> Subject: Re: Log total bandwidth used. In-Reply-To: <20001104154233.A51080@walton.maths.tcd.ie> from David Malone at "Nov 4, 2000 03:42:33 pm" To: dwmalone@maths.tcd.ie (David Malone) Date: Sat, 4 Nov 2000 08:21:20 -0800 (PST) Cc: noor@comrax.com, freebsd-stable@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Sat, Nov 04, 2000 at 11:36:09AM +0200, noor@comrax.com wrote: > > > Using ipfw, is there a way to add a rule to compute all bandwidth used > > during one day? The rule would just compute the bandwidth, then move on > > to the next rule. > > You could just add a rule which says "count ip from any to any" and > look at the byte counts each day with "ipfw show". And understand just what it is this rule is counting. It will be triggered each time a packet arrives on an interface and each time a packet is sent on an interface, ie, if the box is a router traffic _ROUTED_ through it will be counted twice, traffic termininated on the router will be counted once. If you just want your upstream byte count add a ``via XXX'', if you want to seperate input and output by interface use a rule set more like: ipfw add 1 count ip from any to any in via dc0 ipfw add 1 count ip from any to any out via dc0 ipfw add 2 count ip from any to any in via dc1 ipfw add 2 count ip from any to any out via dc1 > > (Just a niggly thing, but bandwidth is usually measured in something > like bytes/second, so "all the bandwidth used during one day" > doesn't make so much sense. You probably mean "the average bandwidth > used during the day" or "the total volume transfered during the > day"). If you want a real bandwidth tool use snmp and mrtg. -- Rod Grimes - KD7CAX @ CN85sl - (RWG25) rgrimes@gndrsh.dnsmgr.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message