Operating System - HP-UX
1835058 Members
2273 Online
110073 Solutions
New Discussion

Running a script during Service Guard node switch

 
Mark Treen_1
Advisor

Running a script during Service Guard node switch

Hi All and a Happy New Year!

Have a question relating to when there is a node fallover in Service Guard.

I have a script which needs to run in the event of a node switch over (Wont go into details of the script as it isnt relevant).

What I need to know guys is where do I put the script in the event of a switch and how do I condigure SG to ask it run in the event of a switch.

As always a thousand thanks

Mark
Mark Treen
2 REPLIES 2
baiju_3
Esteemed Contributor

Re: Running a script during Service Guard node switch

All your custom startup script which you have configured under the customer_defined_cmd command section will get executed while the package is getting failed over to the alternate node .


You can add your script under
function customer_defined_run_cmds

lly halt commands to
function customer_defined_halt_cmds


thx,
bl.
Good things Just Got better (Plz,not stolen from advertisement -:) )
Steven E. Protter
Exalted Contributor

Re: Running a script during Service Guard node switch

Shalom Mark,

I'm not terribly comfy with doing that. Is it possible to have cron detect failover and run the script external to the SG script.

If it must run in the script, perhaps build it into the startup logic script. You can't count on anything running at all when a node goes offline.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com