Hi everybody,
It is just an optimization question, for those who use rlm_sql.
I has the query below in my sql.conf :
accounting_stop_query = "UPDATE ${acct_table1} SET AcctStopTime = '%S',
AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets =
'%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}',
AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay =
'%{Acct-Delay-Time}', ConnectInfo_stop = '%{Connect-Info}',
AcctMultiSessionId = '%{Acct-Multi-Session-Id}', AscendDataRate =
'%{X-Ascend-Data-Rate}', AscendXmitRate = '%{X-Ascend-Xmit-Rate}' WHERE
AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND
NASIPAddress = '%{NAS-IP-Address}'"
With our nas (patton boxes), the SessionId values are reinitialized when
the box reboot, so I think there is a risk of having the same SessionId,
Username and NASIPAddress after each reboot, which would alter the
accounting data.
So my questions are :
* Don't you think that it's good (especially in my case) to add some
conditions in the WHERE clause, for example : FramedIPAddress =
'%{Framed-IP-Address}'" AND NASPortId = '%{NAS-Port-Id}'" ?
* Does someone have a config like this ?
* If I add these conditions, is there a risk of dysfunction or lower
performance ?
* Is it possible to detect if the accounting_stop_query updates *more than
one records*, I think that it is important to detect these problems ...
Waiting for your comments,
Regards,
--
DouRiX \\\|///
___ \\ - - // ____ ___ __
| _ oOOo_@ @_oOOo| _ \(_) \/ /
| | | |/ _(_) | | | |_| ) |\ /
| |_| | (_) | |_| | _ <| |/ \
|____/ \___/ \_Ooooo| \_\_/_/\_\
f u cn rd ths u r usng unx
ooooO ) /
( ) (_/
\ (
\_)
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- Re: about accounting_stop_query ... Do-Risika RAFIEFERANTSIARONJY
- Re: about accounting_stop_query ... Chris Parker
- Re: about accounting_stop_query ..... Do-Risika RAFIEFERANTSIARONJY
- Re: about accounting_stop_query... Chris Parker