diff --git a/FreeRadius.md b/FreeRadius.md index 0367ddc..a145753 100644 --- a/FreeRadius.md +++ b/FreeRadius.md @@ -81,6 +81,10 @@ For all categories, remove the “file” directive and add the “sql” one. T authorize { ..... sql + expiration + quotalimit + accessperiod + uptimelimit .... } @@ -157,6 +161,15 @@ sqlcounter quotalimit { $INCLUDE ${modconfdir}/sql/counter/${dialect}/${.:instance}.conf } + +sqlcounter uptimelimit { + counter_name = 'Max-All-Session-Time' + check_name = 'Max-All-Session' + sql_module_instance = sql + key = 'User-Name' + reset = never + query = "SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='%{${key}}'" +} ``` `mods-config/sql/counter/mysql/accessperiod.conf`