Implimenting Capping with FreeRadius
Peter Nixon
listuser at peternixon.net
Mon Apr 3 19:14:41 CEST 2006
On Mon 03 Apr 2006 16:22, Shawn Hamman wrote:
> Hi,
>
> OS: Fedora C4
> FR: 1.0.2-2
> DB: MySQL 4.1.11-2
>
> I was wondering if anybody has a more elegant solution to implementing
> capping with FreeRadius than writing a script that totals the bytes in/out
> in the radacct table every couple of minutes and updates the radcheck table
> to deny further logins?
Sure. The elegant solution is to simply check the sum of the user's
minutes/bytes from the radacct table in the same query that queries the
radcheck table. You can either do this as a (quite complex) join or
preferably inside a stored procedure. (You may wish to put appropriate
indexes on the radacct table to speed things up)
Cheers
--
Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20060403/14029f6e/attachment.pgp>
More information about the Freeradius-Users
mailing list