<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14pt"><div>hello friends</div><div><br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">I
Test freeradius and run in ubuntu+MySql+Mikrotik as NAS .. FreeRADIUS
Version 2.1.10, for host i686-pc-linux-gnu, built on Sep 24 2012</div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">for limit Download user traffic
daily i user this setting in /etc/freeradius/sql/mysql/counter.conf</div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">====<br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">sqlcounter counterChilliSpotMaxTotalOctetsDaily {<br> counter-name = ChilliSpot-Max-Total-Octets-Daily<br> check-name = CS-Total-Octets-Daily<br>
counter-type = data<br> reply-name = Mikrotik-Xmit-Limit<br> sqlmod-inst = sql<br> key = User-Name<br> reset = daily<br>
query = "SELECT (SUM(AcctInputOctets + AcctOutputOctets)) FROM radacct
WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) +
AcctSessionTime > '%b'"<br> }</div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">====</div><div style="color:rgb(0, 0, 0);font-size:18.6667px;
font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">Now
i have problem in reset= hourly - daily - weekly Or monthly . I dont
know how to fix it for example i set for user CS-Total-Octets-Daily
check attribute 10MB .. user in first login use 9MB and disconnect and
re login again can use 10MB !! user must disconnect after 1MB and user
stay connect ! in this example sum of two connection usage is 19MB !!!
<br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">But if reset = never counter working correctly and user disconnected in exact usage ...</div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br></div><div style="color:rgb(0, 0,
0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">in freeradius -X if reset = never Reply-Item for user is correct
value<br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">[counterChilliSpotMaxTotalOctetsDaily]
expand: %{sql:SELECT (SUM(AcctInputOctets + AcctOutputOctets)) FROM
radacct WHERE UserName='test4' AND UNIX_TIMESTAMP(AcctStartTime) +
AcctSessionTime > '0'} -> 766328<br>rlm_sqlcounter: Check item is greater than query result<br>rlm_sqlcounter: Authorized user test4, check_item=1000000, counter=766328<br>rlm_sqlcounter: Sent Reply-Item for user test4, Type=Mikrotik-Xmit-Limit, value=233672<br>++[counterChilliSpotMaxTotalOctetsDaily] returns ok</div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">=====</div><div style="color:rgb(0, 0,
0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">In freeradius -X if reset = daily Reply-Item for user is not correct value</div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">[counterChilliSpotMaxTotalOctetsDaily]
expand: %{sql:SELECT (SUM(AcctInputOctets + AcctOutputOctets)) FROM
radacct WHERE UserName='test4' AND UNIX_TIMESTAMP(AcctStartTime) +
AcctSessionTime > '1389299400'} -> 727301<br>rlm_sqlcounter: Check item is greater than query result<br>rlm_sqlcounter: Authorized user test4, check_item=1000000, counter=727301<br>rlm_sqlcounter: Sent Reply-Item for user test4, Type=Mikrotik-Xmit-Limit, value=1031030<br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;
font-style:normal;">++[counterChilliSpotMaxTotalOctetsDaily] returns ok<br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br></div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">how can i solve this ??</div><div style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br></div>regards</div></body></html>