From owner-freebsd-questions Tue Jun 9 01:23:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA24260 for freebsd-questions-outgoing; Tue, 9 Jun 1998 01:23:20 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from top.worldcontrol.com (surf52.cruzers.com [205.215.232.52]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id BAA24255 for ; Tue, 9 Jun 1998 01:23:14 -0700 (PDT) (envelope-from brian@worldcontrol.com) From: brian@worldcontrol.com Received: (qmail 4300 invoked by uid 100); 9 Jun 1998 08:24:13 -0000 Message-ID: <19980609012410.A4267@top.worldcontrol.com> Date: Tue, 9 Jun 1998 01:24:10 -0700 To: Jason McKay , questions@FreeBSD.ORG Subject: Re: Measuring Consumption References: <000201bd9361$67c7cca0$70a019cb@jason.webace.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91i In-Reply-To: <000201bd9361$67c7cca0$70a019cb@jason.webace.com.au>; from Jason McKay on Tue, Jun 09, 1998 at 12:45:18PM +0800 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On %M 0, Jason McKay wrote: > I need a means of measuring how much data (in megabytes) my dial-in ppp > clients are using. I am running FreeBSD 2.2.6-RELEASE, with pppd and > mgetty. ipfw (you add the support to your kernel) can count things like packets and bytes. I use it to count the bytes used by each virtual web site. I then pipe the data to mrtg to get cool graphs. Whether you could successfully use it in your application may depend if you do static or dynamic IP assignment. With static you could just count the data going to and from a particular IP. With dynamic you would have to figure out who was associated with which IP at what time. Off the top of my head, it doesn't seem too complicated. Your ppp login script would have to determine who had logged in, what IP they were assigned, add an appropriate count rule, and then log the count when the person hung up. -- Brian Litzinger To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message