SQL Logging

Arran Cudbard-Bell a.cudbardb at freeradius.org
Thu Jul 4 23:51:40 CEST 2019



> On 4 Jul 2019, at 15:50, Richard J Palmer <richard at merula.net> wrote:
> 
> 
> Hi All
> 
> I am trying to optimize some SQL queries & Database performance here - particularly for iptables
> 
> Now for accounting I can have something like:
> 
> accounting {
>    # Write SQL queries to a logfile. This is potentially useful for bulk inserts
>   # when used with the rlm_sql_null driver.
>   logfile = ${logdir}/accounting.sql
> 
> 
> I have tried adding that inside the iptables query file - but that file does not seem to allow that.
> 
> Is there any way to log just the queries from the SQL IP Pool module ?

rlm_sql.c says there's a top level logfile config item, which'd presumably log requests sent from the ippool module.

e.g.:

sql {
	logfile = "<path>"
}

I think the ippool module calls a function which respects that logfile, if it doesn't, report back and someone will fix it for 3.0.20.

Thanks,
-Arran

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2




More information about the Freeradius-Users mailing list