[Date Prev]   [Date Next] [Thread Prev]   [Thread Next] [Date Index]   [Thread Index]


     [nocol-users] 2 issues with keepalive_monitors


	Trying to run keepalive_monitors on a Sparc Linux (2.0.30) system,
version :

# $Header: /home/vikas/src/nocol/src/utility/RCS/keepalive_monitors,v 1.10 1994/06/17 15:19:55 vikas Exp $

	1) On line 87, the line is :

   if test $? = 0 -a -x $p ; then         # process is dead, restart

	A return of 0 from egrep means found, not not found.  Changing it to:

   if test $? = 1 -a -x $p ; then         # process is dead, restart

	is the correct thing

	2) On line 84, the line is :

     ps ${PSFLAGS} |grep -v grep |egrep "$BIN/${p}([ ]*|\$)" >/dev/null 2>&1

	however, if the process gets swapped out, it only shows up as "(${p})".
This would continously restart a process as it got swapped out.  I changed
this to :

     ps ${PSFLAGS} |grep -v grep |egrep "${p}([ ]*|\$)" >/dev/null 2>&1

	and it seems to work better.

	Are these the proper things to do?  Is there something different/better?

		Thanks, Tuc/TTSG