Operating System - HP-UX
1825775 Members
2053 Online
109687 Solutions
New Discussion

Re: ignite success script

 
Rpger Tavener
Occasional Advisor

ignite success script

We need a script to email us if make_recovery fails for any reason., We currently mail the results of the makrec.log1 file , but we really only need emails if the job fails.

Thanks
When the only tool you own is a hammer, every problem looks like a nail!
3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor

Re: ignite success script

Hi,

Try the following simple script. Replace the make_recovery command line with your options.

#!/usr/bin/ksh

HOST=$(hostname)
EMAIL="your_id@yourhost.com"
/opt/ignite/bin/make_recovery -v -A > /tmp/ignite.out 2>&1
if [ $? -ne 0 ]
then
cat /tmp/ignite.out |mailx -s "$HOST - make_recovery failed" $EMAIL
fi

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Pete Randall
Outstanding Contributor

Re: ignite success script

Roger,

Here's a simple script that you might be able to adapt:

if [ `grep -i 'message_indicating_failure' /full/path/to/makrec.log1 | wc -l` -gt 0 ]
then
echo "$hostname had an ignite failure" > file.oops
elm -s "Oops" joeblow@wherever.com < file.oops
fi

Pete

Pete
RAC_1
Honored Contributor

Re: ignite success script

file it though script.

make_recovery -ACvd /dev/rmt/0mn
if [$? -ne 0]
mailx -s "recovery Failed" your_Address
exit
There is no substitute to HARDWORK