Hi<br><br>I will try run the queries manually and see what happens.<br><br>rlm_sqlcounter is cool, but this should work right?<br><br><div class="gmail_quote">On Sun, Feb 6, 2011 at 5:28 PM, Fajar A. Nugraha <span dir="ltr"><<a href="mailto:list@fajar.net">list@fajar.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On Sun, Feb 6, 2011 at 9:55 PM, Tyller D <<a href="mailto:tyllerd@gmail.com">tyllerd@gmail.com</a>> wrote:<br>
>I can see how much traffic a users used in<br>
> his session (i.e. in the radacct table) so the accounting_stop_query &<br>
> accounting_stop_query_alt are not failing, its just not updating the<br>
> databank value in radcheck.<br>
><br>
> here are the two queries<br>
><br>
> accounting_stop_query = " \<br>
> UPDATE radacct,radcheck SET \<br>
> radacct.acctstoptime = '%S', \<br>
> radacct.acctsessiontime = '%{Acct-Session-Time}', \<br>
> radacct.acctinputoctets = '%{%{Acct-Input-Gigawords}:-0}' <<<br>
> 32 | \<br>
> '%{%{Acct-Input-Octets}:-0}', \<br>
> radacct.acctoutputoctets = '%{%{Acct-Output-Gigawords}:-0}'<br>
> << 32 | \<br>
> '%{%{Acct-Output-Octets}:-0}', \<br>
> radacct.acctterminatecause = '%{Acct-Terminate-Cause}', \<br>
> radcheck.value = radcheck.value - '%{Acct-Output-Octets}' -<br>
> '%{Acct-Input-Octets}', \<br>
> radacct.acctstopdelay = '%{%{Acct-Delay-Time}:-0}', \<br>
> radacct.connectinfo_stop = '%{Connect-Info}' \<br>
> WHERE radacct.acctsessionid = '%{Acct-Session-Id}' \<br>
> AND radcheck.username = '%{SQL-User-Name}' \<br>
> AND radcheck.attribute = 'databank' \<br>
> AND radacct.username = '%{SQL-User-Name}' \<br>
> AND radacct.nasipaddress = '%{NAS-IP-Address}'"<br>
<br>
<br>
</div></div>My guess is something in your query is wrong.<br>
What happens when you run the query MANUALLY on your SQL server?<br>
When running with debug mode (or sqltrace enabled), you should be able<br>
to see what queries are executed.<br>
<br>
Another option you might want to look at is rlm_sqlcounter, which can<br>
be used to limit a user to a certain usage quota (is this what you're<br>
trying to do?)<br>
<font color="#888888"><br>
--<br>
Fajar<br>
<br>
-<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>
</font></blockquote></div><br>