sqlcounters for traffic
Alexandre Chapellon
alexandre.chapellon at mana.pf
Wed Sep 10 00:15:16 CEST 2008
so what's the use of the reset parameter if th sql query is managing it
all by its own?
Alexandre Chapellon a écrit :
>
>
> tnt at kalik.net a écrit :
>>> here is the counter definition:
>>> sqlcounter bytesQuota {
>>> counter-name = traffic_quota
>>> check-name = Max-Traffic
>>> reply-name = Tmp-Integer-0
>>> sqlmod-inst = mysqldb
>>> key = User-Name
>>> reset = hourly
>>> query = "SELECT SUM(acctinputoctets + acctoutputoctets) FROM
>>> radacct WHERE UserName='%{%k}'"
>>> }
>>>
>>> sounds good to me... what could be the reasn for noreset?
>>>
>>>
>>
>>
>>> query = "SELECT SUM(acctinputoctets + acctoutputoctets) FROM
>>> radacct WHERE UserName='%{%k}'"
>>>
>>
>> You need to add to WHERE one of the statements using %b.
>>
>
> Ouch i didn't saw that in the example queries... spank my ...!
>> Ivan Kalik
>> Kalik Informatika ISP
>>
>> -
>> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>>
>>
> ------------------------------------------------------------------------
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20080909/544a28ce/attachment.html>
More information about the Freeradius-Users
mailing list