Date: Sat, 22 Jun 2002 21:15:21 +0200 From: Hans-Joachim Picht <hjp@lnxce.net> To: freebsd-isp@FreeBSD.ORG Subject: Re: Bandwidth billing and measurement scripts Message-ID: <20020622191521.GA1125@lnxce.net> In-Reply-To: <DD446E42-837F-11D6-A68D-003065C60B4C@mac.com> References: <MBEKKDFNOOOCNGBGIOMHEEKCGFAA.bambi@Hughes.com.au> <DD446E42-837F-11D6-A68D-003065C60B4C@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 19, 2002 at 09:57:04PM +0930, Wincent Colaiuta wrote: > Because I want this thing to be stable, robust, and dependable enough to > use as a reliable platform for billing, a design goal would be to build > it out of simple, well-tested tools that are already present in a > standard FreeBSD install. So we're talking here a collection of Perl and > Bourne shell scripts interacting with ipfw and using dbm and perhaps > some flat files for data storage, all driven by cron. > > What I'd like it to do: > - run as an hourly cron job > - count incoming and outgoing bandwidth user per IP based on ipfw > "count" rules - this should give a totally accurate traffic count > without the need to resort to parsing mail, http and ftp logs (which > could get very messy) > - save ipfw output to disc for safe keeping A tool for that is already available. http://www.simon.org.ua/ipa/ > - update usage totals per customer in the dbm database: daily and > monthly totals Daily, weekly and monthly report are not a problem. > - when customer hits bandwidth quota for the month, send a warning email > - when customer exceeds bandwidth quota by 25% or more, account > temporarily suspended (browser redirected to an explanatory page using > mod_rewrite), send customer notification email I develeoped a ugly perl-script to write the ipastat output (link above) into a mysql database. > - generate simple HTML pages showing usage libgd > - provide an easy mechanism for adding/removing hosts/customers to/from > the accounting system > - able to administer from the shell or from a web-interface CGI With best regards Hans -- Work: Consultant with Linux Consulting Europe <hjp@lnxce.net> http://www.lnxce.net Vogelhecke 2 D - 35447 Reiskirchen Tel: +491751629201 Fax: +49640862649 Germany Private: hans@picht.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020622191521.GA1125>