>
> I have downloaded version 0.8, and I've been lookoing at the sql (mysql)
> table... It seems that there is no entry for Max-Session-Time (or is it
> Max-Daily Session?) or either the Daily-Session-Time...
>
> Can anyone guide me on how to use these tokens properly... TIA
>
> Peter
I used Max-Daily-Session, Max-Monthly-Session and Max-All-Session with version
0.7.1.
radiusd.conf
....
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 = sql
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 = sql
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'"
}
...
authorize {
preprocess
sql
noresetcounter
dailycounter
monthlycounter
files
}
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html