Hi,
take a look on that side .....
I have an older version of dbup.sh like this:
VERBOSE=0
shift OPTIND-1
for INSTANCE in $DB
do
FAILED=0; INSTANCEDOWN=0
if [ ${VERBOSE} -eq "1" ] ; then
echo "Checking instance ${INSTANCE}...\n"
fi
for PROCESS in pmon smon
do
RC=$(ps -ef | egrep ${INSTANCE} | egrep -v 'grep' | egrep ${PROCESS})
if [ "${RC}" = "" ] ; then
INSTANCEDOWN=1
if [ ${VERBOSE} -eq "1" ] ; then
echo "\tERROR: Instance ${INSTANCE} ${PROCESS} down!"
fi
fi
done
if [ ${INSTANCEDOWN} = "1" ] ; then
echo "`date` - Instance ${INSTANCE} is DOWN!!!\n"
FAILED=1
else
echo "`date` - Instance ${INSTANCE} is running.\n"
fi
done
if [ ${FAILED} = 1 ] ; then
return -1
else
return 0
fi
this is a script for determing if an Instance is up and running. I got it working and its okay.
hth
Uwe