Re: Monitor script
Posted in 1998
"Mark D. Stock" wrote:
> Miles Palmer wrote:
> >
> > Does anyone have a Sun script that can be executed in cron to see if the
> > database/server is still up?
> >
> > Thanks in advance!
>
> Something like:
>
> ------------------------------------------------------------------------
> ....Set your environment ...carefully
> onstat - >/dev/null
> if [ $? -ne 5 ]
> then
> ....online is down
> fi
> ------------------------------------------------------------------------
>>This could work as well (after setting variables):
>>SERVER_STAT=`onstat | egrep -c "shared memory not initialized"`
>>if expr "$SERVER_STAT" = 1 >/dev/null
>> then
>> echo "The INFORMIX DATABASE Engine on ${SYSNAME} is currently down."
>>fi
Greg