<div dir="ltr"><font face="trebuchet ms, sans-serif">Dear Aran C. Bell</font><div><font face="trebuchet ms, sans-serif"><br></font></div><div><font face="trebuchet ms, sans-serif">Thanks for everything, Here is update.</font></div>
<div><font face="trebuchet ms, sans-serif"><br></font></div><div><font face="trebuchet ms, sans-serif">1.) </font></div><div><font face="trebuchet ms, sans-serif"><br></font></div><div><font face="trebuchet ms, sans-serif">All-In-MB counter works. Please note, when a user has downloaded his quota,</font><span style="font-family:'trebuchet ms',sans-serif"> counter do not force log off</span><span style="font-family:'trebuchet ms',sans-serif"> </span><font face="trebuchet ms, sans-serif">. Saying other way, if the user is online, he would remain online until he log off him self or stop browsing. But point to be noted that counter prevents from login him again. user cannot login again if he has already hit quota threshold. Please look the example of reject. </font><span style="font-family:'trebuchet ms',sans-serif">This user is allowed for 7GB, please mind that </span><b style="font-family:'trebuchet ms',sans-serif">check_item which shows 7168</b><span style="font-family:'trebuchet ms',sans-serif"> is specified</span><span style="font-family:'trebuchet ms',sans-serif"> in MB. </span></div>
<div>







<p class=""><font face="garamond, serif"><b>[gigawordcounter]       expand: %{sql:SELECT SUM(AcctInputOctets) / (1024*1024) + SUM(AcctOutputOctets) / (1024*1024) FROM radacct WHERE UserName='quotauser'} -> 7389.1705</b></font></p>
<p class=""><font face="garamond, serif"><b>rlm_sqlcounter: (Check item - counter) is less than zero</b></font></p>
<p class=""><font face="garamond, serif"><b>rlm_sqlcounter: Rejected user quotauser, <font color="#ff00ff">check_item=7168,</font> counter=7389</b></font></p>
<p class=""><b><font face="garamond, serif" color="#ff00ff">++[gigawordcounter] returns reject</font></b></p></div><div class="gmail_extra"><span style="font-family:'trebuchet ms',sans-serif">Which basically means that initially authorization</span><font face="trebuchet ms, sans-serif"> is done by SQL then "max_all_mb", checks are only done once when the user makes the logon attempt and checks are never done again. This is where i have failed. Since you are more in to this, is there a way to perform this check on frequent basis and send reply to NAS to logoff user? then it should work. </font><br>
</div><div class="gmail_extra"><font face="trebuchet ms, sans-serif"><br></font></div><div class="gmail_extra"><font face="trebuchet ms, sans-serif">Counter:</font></div><div class="gmail_extra"><font face="trebuchet ms, sans-serif"><br>
</font></div><div class="gmail_extra"><span style="font-size:12px;font-family:'Trebuchet MS'">sqlcounter gigawordcounter {</span><br>
<span style="font-size:12px;font-family:'Trebuchet MS'">            counter-name = Max-All-MB</span><br>
<span style="font-size:12px;font-family:'Trebuchet MS'">            check-name = Max-All-MB</span><br>
<span style="font-size:12px;font-family:'Trebuchet MS'">            reply-name = Max-All-MB</span><br>
<span style="font-size:12px;font-family:'Trebuchet MS'">            reply-message = "You have reached your bandwidth limit"</span><br>
<span style="font-size:12px;font-family:'Trebuchet MS'">            sqlmod-inst = sql</span><br>
<span style="font-size:12px;font-family:'Trebuchet MS'">            key = User-Name</span><br>
<span style="font-size:12px;font-family:'Trebuchet MS'">            reset = never</span><br>
<span style="font-size:12px;font-family:'Trebuchet MS'">            query = "SELECT SUM(AcctInputOctets) / (1024*1024) + SUM(AcctOutputOctets) / (1024*1024) FROM radacct WHERE UserName='%{%k}'"</span><br>

<span style="font-size:12px;font-family:'Trebuchet MS'">}</span><br></div>
                
        
        
                <div class="" title="Page 11">
                        <div class="">
                                <div class="">
                                        <p><br></p><p><b style="color:rgb(255,0,0);font-family:'trebuchet ms',sans-serif">2.) Solution offered by You. </b><br></p><p><span style="font-family:'trebuchet ms',sans-serif">I tried your recommendations also, i tried to maintain following in local FR dictionary </span><b style="font-family:'trebuchet ms',sans-serif">"/etc/freeradius/dictionary"</b><font face="trebuchet ms, sans-serif"> and Chilli dictionary </font><br>
</p><p><span style="font-size:13px;font-family:'trebuchet ms',sans-serif">ATTRIBUTE       Acct-Input-Octets64     3005    integer64</span><br></p><p><font face="trebuchet ms, sans-serif"><span style="font-size:13px">ATTRIBUTE       Acct-Output-Octets64    3006    integer64</span><br>
</font></p><p><font face="trebuchet ms, sans-serif"><span style="font-size:13px">Results: </span></font><span style="font-family:'trebuchet ms',sans-serif">failed to start FR</span><br></p><p><span style="font-family:'trebuchet ms',sans-serif">reason for failing: : un recognized value specified in </span><b style="font-family:'trebuchet ms',sans-serif">"/etc/freeradius/dictionary"</b><span style="font-family:'trebuchet ms',sans-serif"> </span><br>
</p><p><font face="trebuchet ms, sans-serif">reason for failing: : un recognized value specified in <b>"/usr/share/freeradius/dictionary.chillihotspot"</b> </font></p><p><font face="trebuchet ms, sans-serif">Thanks / Regards</font></p>
<p><font face="trebuchet ms, sans-serif">RM --</font></p><p>On Tue, Oct 8, 2013 at 3:38 PM, Arran Cudbard-Bell <span dir="ltr"><<a href="mailto:a.cudbardb@freeradius.org" target="_blank">a.cudbardb@freeradius.org</a>></span> wrote:<br>
</p></div></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im"><br>
On 8 Oct 2013, at 15:40, Russell Mike <<a href="mailto:radius.sir@gmail.com">radius.sir@gmail.com</a>> wrote:<br>
<br>
> Dear Arran C. Bell,<br>
><br>
> Thank you very much, i am extremely grateful for your advise and guidelines for troubleshoot also. i am currently experimenting a different rlm_sqlcounter using CoovaChilli dictionary "All-In-MB". In result, i can store short number in db. This counter would reset at 2TB with same 32bit number. i have actually tested up to 6GB. it just works!!!. Next test is in progress to logout user when 7GB downloaded. i really appreciated your input and TIME.<br>

><br>
> i will try your proposed solution as well after "All-In-MB" has tested. After the successful practical of both solutions. i would like to document this topic on one page for archives, so that it can help others. i may need your support incase i came across some challenges during the test of your solution.<br>

<br>
</div><a href="http://wiki.freeradius.org" target="_blank">wiki.freeradius.org</a> is the place to do that :)<br>
<br>
><br>
> Thanks once again !!!<br>
<br>
No problem, glad I could help.<br>
<span class=""><font color="#888888"><br>
-Arran<br>
</font></span><div class=""><div class="h5">-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br>
</div></div></blockquote></div><br></div></div>