From owner-freebsd-questions Thu Jun 6 17:41: 2 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx.znet.net.au (mx.znet.net.au [203.87.59.5]) by hub.freebsd.org (Postfix) with ESMTP id C832E37B401 for ; Thu, 6 Jun 2002 17:40:54 -0700 (PDT) Received: from swegg (dialup-221.189.220.203.acc01-apli-cai.comindico.com.au [203.220.189.221]) by mx.znet.net.au (8.9.3/8.9.3) with SMTP id KAA14581 for ; Fri, 7 Jun 2002 10:40:21 +1000 (EST) (envelope-from robbak@comnorth.com.au) Message-ID: <000a01c20dbb$f2bca550$fa6318ac@swegg> From: "Robert" To: Subject: ip trafic accounting for Internt Cafe Date: Fri, 7 Jun 2002 10:39:46 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I am have recently installed a router in an internet cafe which has just now got adsl broadband access (yes, we are terrifically behind the times here in far north Queensland - it became available just last month!) as there are traffic limits and charges (14c Aust over 3G) they need to keep track of traffic used and charge extra to large downloaders. They are also kitted out with Burners etc, so anything's possible. Can anyone give me the best way to do this? I need to supply them with a web page that gives them the traffic used, and a function to clear the counter. I could accomplish this with an ipfw rule (count log any from any vie ed0) and tail /var/logfile | myprog, which would parse the logs into counters for each ip address, write it to a file etc, and cgi to produce the page. But the constant disk writes sound inefficient to me. so 1 - would using a small memory file system be a good stable solution? 2 - am I on the wrong track entirely? 3 - am I re-inventing a very common wheel? Thanks for your help. If you could cc. me at robbak@biz.net.au it would be a help, but I'll keep up with the list via the web page. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message