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

Attachment: pgpNPCiXlewzQ.pgp
Description: PGP signature

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to