[RADIATOR] Trace Level and ServerFarm

Jose Borges Ferreira underspell at gmail.com
Thu Jul 2 06:09:01 CDT 2015


Hi all,

I noticed that when I run Radiator with FarmSize > 1 the trace change via
kill -USR[12] only applies to the parent process.

I've looked at the init script provided and validated via strace that
 start-stop-daemon only sends the kill signal to the parent process PID.

After digging into radiusd I corrected this in two different ways:

 1. Patch the code ( in annex )
 2. Configured USR1Hook and USR2Hook to have similar behaviour .

USR1Hook sub {\
        if ($main::farmInstance == 0) { &main::signal_children('USR1'); }\
        $main::config->{Trace} = &Radius::Log::adjustTrace(1);\
        &main::log($main::LOG_ERR, "Trace level increased to
$main::config->{Trace}");\
    }

USR2Hook sub {\
        if ($main::farmInstance == 0) { &main::signal_children('USR2'); }\
        $main::config->{Trace} = &Radius::Log::adjustTrace(-1);\
        &main::log($main::LOG_ERR, "Trace level decreased to
$main::config->{Trace}");\
    }


The alternative is to send the KILL sign to all children via

killall -USR1 radiusd
or
kill -USR1 `ps auxw | grep radiusd | grep -v grep | cut -b 10-15  `
or whatever

Jose Borges Ferreira
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open.com.au/pipermail/radiator/attachments/20150702/4b558fc0/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: radiusd.patch
Type: text/x-patch
Size: 662 bytes
Desc: not available
Url : http://www.open.com.au/pipermail/radiator/attachments/20150702/4b558fc0/attachment.bin 


More information about the radiator mailing list