Looking at the source of rlm_sqlcounter i saw that when a users tries to conect at a time close to the next reset time, the value of the check-item for the next cycle is added to the reply item. I'd like to avoid this behaviour for **some** of my users. Indeed I want to use counters to count traffic and **not** time while rlm_sqlcounter decide it's closed to reset time when check-item - counter (in my case: bytes) is less than the number of second untill reset time. Can i disable this behaviour? how? tnt@kalik.net a écrit :
reset parameter controls value of %b.
Ivan Kalik Kalik Informatika ISP
Dana 9/9/2008, "Alexandre Chapellon" <alexandre.chapellon@mana.pf> piše:
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@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/usershtml
------------------------------------------------------------------------
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html