On Sun, Feb 6, 2011 at 9:55 PM, Tyller D <[email protected]> wrote: >I can see how much traffic a users used in > his session (i.e. in the radacct table) so the accounting_stop_query & > accounting_stop_query_alt are not failing, its just not updating the > databank value in radcheck. > > here are the two queries > > accounting_stop_query = " \ > UPDATE radacct,radcheck SET \ > radacct.acctstoptime = '%S', \ > radacct.acctsessiontime = '%{Acct-Session-Time}', \ > radacct.acctinputoctets = '%{%{Acct-Input-Gigawords}:-0}' << > 32 | \ > '%{%{Acct-Input-Octets}:-0}', \ > radacct.acctoutputoctets = '%{%{Acct-Output-Gigawords}:-0}' > << 32 | \ > '%{%{Acct-Output-Octets}:-0}', \ > radacct.acctterminatecause = '%{Acct-Terminate-Cause}', \ > radcheck.value = radcheck.value - '%{Acct-Output-Octets}' - > '%{Acct-Input-Octets}', \ > radacct.acctstopdelay = '%{%{Acct-Delay-Time}:-0}', \ > radacct.connectinfo_stop = '%{Connect-Info}' \ > WHERE radacct.acctsessionid = '%{Acct-Session-Id}' \ > AND radcheck.username = '%{SQL-User-Name}' \ > AND radcheck.attribute = 'databank' \ > AND radacct.username = '%{SQL-User-Name}' \ > AND radacct.nasipaddress = '%{NAS-IP-Address}'"
My guess is something in your query is wrong. What happens when you run the query MANUALLY on your SQL server? When running with debug mode (or sqltrace enabled), you should be able to see what queries are executed. Another option you might want to look at is rlm_sqlcounter, which can be used to limit a user to a certain usage quota (is this what you're trying to do?) -- Fajar - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

