problems with sqlcounter

debik debik at vp.pl
Wed Mar 1 23:21:11 CET 2006


I'm not an expert in this config, but i thinh the time is in second. So you 
know houer have 3600 seconds, so dont be suproise if radius is kicking you 
off because you told him to kick user after 30 seconds ;)


----- Original Message ----- 
From: "Przemysław Backiel" <przemyslaw.backiel at backiel.com.pl>
To: "FreeRadius users mailing list" <freeradius-users at lists.freeradius.org>
Sent: Wednesday, March 01, 2006 5:21 PM
Subject: problems with sqlcounter


> Hello,
>
> I have a problem with sqlcounter. I am using a 1.1.0 version of 
> freeradius.
> I have that problem: When I set a atribute Max-Daily-Session := 30
> the user can connect after total time of 30 sec radius kicks him, but he 
> can re connect, I don't know where is the source of the problem, please 
> help me.
>
>
> my sqlcounter.conf looks just like this:
>
> sqlcounter noresetcounter {
>                 counter-name = Max-All-Session-Time
>                 check-name = Max-All-Session
>                 sqlmod-inst = sql
>                 key = User-Name
>                 reset = never
>
>                 query = "SELECT SUM(AcctSessionTime) FROM radacct WHERE 
> UserName='%{%k}'"
>
>         }
>
>
> sqlcounter dailycounter {
>                 driver = "rlm_sqlcounter"
>                 counter-name = Daily-Session-Time
>                 check-name = Max-Daily-Session
>                 sqlmod-inst = sqlcca3
>                 key = User-Name
>                 reset = daily
>
>                 query = "SELECT SUM(AcctSessionTime - GREATEST((%b - 
> UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}' 
> AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"
>
>         }
>
> sqlcounter monthlycounter {
>                 counter-name = Monthly-Session-Time
>                 check-name = Max-Monthly-Session
>                 sqlmod-inst = sqlcca3
>                 key = User-Name
>                 reset = monthly
>
>                 query = "SELECT SUM(AcctSessionTime - GREATEST((%b - 
> UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}' 
> AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"
>
>         }
>
> -- 
> Z powazaniem
> Przemyslaw Backiel
>
> - List info/subscribe/unsubscribe? See 
> http://www.freeradius.org/list/users.html 




More information about the Freeradius-Users mailing list