SomeWhereOverTheRainBow
Part of the Furniture
glad you found something that works.All:
I ended up modifying the zomg_cfg_server script (with a 1 minute cronjob) to only kill -9 any newly created cfg_server processes greater than the original 3 processes, which appears to be working without invoking the watchdog start_cfgsync process (as the parent cfg_server is preserved in a healthy state), subverting the restart_wireless processes on the AiMesh Nodes, and avoiding constant writing to the primary router's syslog.
Code:# cat /jffs/sbin/zomg_cfg_server #!/bin/sh i=1 procs="$(pidof cfg_server)" for pid in $procs; do if [ "$i" -gt "3" ]; then #echo $i #echo $pid /usr/bin/kill -9 $pid /usr/bin/logger "Running /jffs/sbin/zomg_cfg_server" fi i=$((i + 1)) done
It seems to be working very well. I'll update this post, if there are any observed ill effects.
I believe this to be a more ideal solution than the previous killall recommendation.
Respectfully,
Gary
It would be cool if something like this would work.
Code:
#!/bin/sh
procs="$(ps -T | awk '/cfg_server/ {print $1}' | awk '{printf "%s ",$0} END {print ""}')"
if [ "$procs" ]; then
for PID in $procs; do
if awk '{ print }' "/proc/${PID}/cmdline" | grep -q defunct; then
kill -9 "$PID"
break
fi
done
fi