From owner-freebsd-questions@FreeBSD.ORG Sun Jul 25 10:35:03 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C1AD416A4CE for ; Sun, 25 Jul 2004 10:35:03 +0000 (GMT) Received: from av6-1-sn2.hy.skanova.net (av6-1-sn2.hy.skanova.net [81.228.8.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id B3EED43D1F for ; Sun, 25 Jul 2004 10:35:02 +0000 (GMT) (envelope-from ertr1013@student.uu.se) Received: by av6-1-sn2.hy.skanova.net (Postfix, from userid 502) id D842437E47; Sun, 25 Jul 2004 12:35:00 +0200 (CEST) Received: from smtp2-1-sn2.hy.skanova.net (smtp2-1-sn2.hy.skanova.net [81.228.8.177]) by av6-1-sn2.hy.skanova.net (Postfix) with ESMTP id C7F5537E42 for ; Sun, 25 Jul 2004 12:35:00 +0200 (CEST) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by smtp2-1-sn2.hy.skanova.net (Postfix) with SMTP id A0B4D37E43 for ; Sun, 25 Jul 2004 12:35:00 +0200 (CEST) Received: (qmail 14696 invoked by uid 1001); 25 Jul 2004 10:34:59 -0000 Date: Sun, 25 Jul 2004 12:34:59 +0200 From: Erik Trulsson To: Angus Barrow Message-ID: <20040725103459.GA14659@falcon.midgard.homeip.net> Mail-Followup-To: Angus Barrow , freebsd-questions@freebsd.org References: <1090753960.2113.9.camel@agb-dtop.studnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1090753960.2113.9.camel@agb-dtop.studnet> User-Agent: Mutt/1.5.6i cc: freebsd-questions@freebsd.org Subject: Re: Interface Statistics X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2004 10:35:03 -0000 On Sun, Jul 25, 2004 at 12:12:40PM +0100, Angus Barrow wrote: > Hi, > I'm a relative newbie to the world of computer admining and have the > following problem. I'm one of a group of students sharing a connection > which is limited (by the cabelco) to 1GB maximum transfer in any 24 hour > period. I've been trying in vain to find a way to at least warn us if > the transfer in a 24 hour period approaches a gigabyte. > > I know that on linux ifconfig shows a counter of the total amount of > data transfered over an interface and was wondering if there is a > similar tool for FreeBSD as the ifconfig provided doesn't seem to show > this information. > > I've tried googleing in vain and have attempted to set up ntop and > zabbix to see if they could provide the information (ntop didn't want to > play and zabbix still has me beat). > > I'm running the configuration shown below: > > > > -=INTERNET=- > | > | > -=ROUTER.STUDNET=- > | > | > -=SWITCH=- > | > | > -=Computers in rooms=- > > The router has two NIC's, xl0 is DHCP configured and is the internet, > the other (dc0) is 192.168.1.1. The router is running FreeBSD > 5.2.1-RELEASE and drops almost all incoming traffic via ipfw and uses > natd to masquerade the connections. Parsing the output of 'netstat -I xl0 -b' (or 'netstat -ib' for all interfaces) seems like a viable solution. -- Erik Trulsson ertr1013@student.uu.se