Operating System - HP-UX
1833767 Members
2753 Online
110063 Solutions
New Discussion

mail sent over to me when the package fail over

 
Joyce Suganthy
Advisor

mail sent over to me when the package fail over

Hi All,

How do I write a script that send an email when the package failover to the secondary node or the package goes down?????

Thanks
2 REPLIES 2
Saurav_1
Valued Contributor

Re: mail sent over to me when the package fail over

Hi,

I just made this script. may this help U.
__________________________________________
#!/usr/bin/ksh
cmviewcl -v > /tmp/cmviewcl-v
cat /tmp/cmviewcl-v | grep -i down > /tmp/help
cat /tmp/cmviewcl-v | grep -i halting >> /tmp/help
cat /tmp/cmviewcl-v | grep -i unknown >> /tmp/help
cat /tmp/help | mailx -s "paoclind" test@company.com
exit
---------------------------------------------
you can put this script in cron to run every min. This will tell you the status of cluster note this will not execute till the time something wrong happens.

Regards

saurav

Stephen Doud
Honored Contributor

Re: mail sent over to me when the package fail over

Add a line to each node's package control script - customer_defined_run_cmds section, which generates an email to notify you that the package is now running on this server.

Example:

echo "ACLK pkg starting on $HOSTNAME " | elm -s "ACLK STARTING ON $HOSTNAME" sed@atl.hp.com

-Stephen Doud