<p dir="ltr"><a href="mailto:jmoranrod@gmail.com">jmoranrod@gmail.com</a><br>
El 16/07/2014 01:24, "Ali Jawad" <<a href="mailto:alijawad1@gmail.com">alijawad1@gmail.com</a>> escribió:<br>
><br>
> Hi<br>
> I did setup a max monthly quota check to limit the amount of B/W used by a user. The test worked, BUT only after a user disconnects and reconnects. While a user is connected he can go over limit and keep doing so. I did do some reading and obviously the reason is that in radacct acctinputoctets and acctoutputoctets are only set with a stop signal.<br>

><br>
> Quote : <br>
><br>
> This attribute indicates how many octets have been received from the port over the course of this service being provided, and can only be present in Accounting-Request records where the Acct-Status-Type is set to Stop.<br>

><br>
><br>
> My setup is quite simple ,I do use the below. Now the question is , is there another approach to overcome this limitation ? Or can I force a Acct-Status refresh of some sort without disconnecting users ?<br>
><br>
> sqlcounter daily-BW-counter {<br>
><br>
>         counter-name = Daily-Session-Octets<br>
><br>
>         check-name = Max-Daily-Octets<br>
><br>
>         reply-name = Session-Timeout<br>
><br>
>         sqlmod-inst = sql<br>
><br>
>         key = User-Name<br>
><br>
>         reset = daily<br>
><br>
><br>
> query = "SELECT SUM(AcctInputOctets) + SUM(AcctOutputOctets) FROM radacct  WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"<br>
><br>
><br>
><br>
><br>
> }<br>
><br>
><br>
> -<br>
I have a module working on my server called " Access-Period " maybe you can adapt the query to work for your schema. </p>
<p dir="ltr">I don't have access to the server right now, try searching in google for "access-period module". </p>