issue with dialup.conf
Tyller D
tyllerd at gmail.com
Sun Feb 6 19:08:41 CET 2011
Hi
I will try run the queries manually and see what happens.
rlm_sqlcounter is cool, but this should work right?
On Sun, Feb 6, 2011 at 5:28 PM, Fajar A. Nugraha <list at fajar.net> wrote:
> On Sun, Feb 6, 2011 at 9:55 PM, Tyller D <tyllerd at gmail.com> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20110206/85a6214b/attachment.html>
More information about the Freeradius-Users
mailing list