Operating System - HP-UX
1830899 Members
2963 Online
110017 Solutions
New Discussion

start script when power fails

 

start script when power fails

Hello,
I have a hp-ux (10.20) server which is attached to a UPS (tty0p1). I have configured ups_mond to begin the shutdown procedure after 3 minutes. The first thing the server should do is bring down some clients. The clients have to go down when the server will go down by the ups but not by a normal reboot. I tried to make a script which searches the though syslog file if the system shuts down by the power fail but I don???t always see the same message. Is there a different approach to run a script when the ups demon brings down the system?

Thanks,
Robert Verhagen.
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: start script when power fails

#ups::respawn:rtprio 0 /usr/lbin/ups_mond -f /etc/ups_conf

in file /etc/inittab should handle it.

Caveat. I copied this from a 11.00 system.

Good Luck.

Steve
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
vasundhara
Frequent Advisor

Re: start script when power fails

For HP systems "HP PowerTrust" software is available to handle this type of scenarios
vasundhara
Frequent Advisor

Re: start script when power fails

For HP systems "HP PowerTrust" software is available to handle this type of scenarios

Rgds
VJ