Hi All
I like to be able to keep track of which process failed out of the list
from bb-proctab and restart. Currently bb-procs.sh seems only append
the record to a file and reset the proc variable for next process. I
like to have rather a proc as an array variable. That way I can pull
out the failed process from the array records and restart. Is that a
feature that I can request? I can go ahead and modify the bb-procs.sh
unless someone already has an extension script that replaces and
enriches bb-procs.sh.
I just modified the bb-procs.sh, that comes with bb1.9c, with the
following patch. The key part is calling the function restart_proc with
the $proc variable. (I chose this over picking an array variable for
simplicity.) There are couple ways I guess we can create the function
to restart the proc and that is probably out of the scope of this email.
--- /export/home/bbro/bb/bin/bb-procs.sh Wed Mar 13 04:04:24 2002
+++ /export/home/bbro/bb/bin/bb-procs.sh.new Fri Nov 25 18:38:15 2005
@@ -191,6 +191,13 @@
else
NUMPROCS=0
fi
+
+ if [ "$NUMPROCS" -eq 0 ]
+ then
+ #echo "$proc is not running"
+ #echo "$proc restarting...."
+
# calling restart_proc function. It will also reset the value of
NUMPROCS
+ restart_proc $proc || NUMPROCS=0
+ fi
$RM -f $BBTMP/bb-procs.$$
RC=0
ERRMSG1=""
Any suggestion or feedback is welcome.
Thanks