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
--- /tmp/radiusd 2015-07-02 11:27:47.477399979 +0100
+++ bin/radiusd 2015-07-02 11:25:18.767249894 +0100
@@ -628,6 +628,10 @@
}
else
{
+ if ($main::farmInstance == 0)
+ {
+ signal_children('USR1');
+ }
$main::config->{Trace} = &Radius::Log::adjustTrace(1);
&log($main::LOG_INFO, "Trace level increased to $main::config->{Trace}");
}
@@ -643,6 +647,10 @@
}
else
{
+ if ($main::farmInstance == 0)
+ {
+ signal_children('USR2');
+ }
$main::config->{Trace} = &Radius::Log::adjustTrace(-1);
&log($main::LOG_INFO, "Trace level decreased to $main::config->{Trace}");
}
_______________________________________________
radiator mailing list
[email protected]
http://www.open.com.au/mailman/listinfo/radiator