Operating System - HP-UX
1825802 Members
2279 Online
109687 Solutions
New Discussion

Re: ups_mond and ups_conf help

 
Andy Stout
Frequent Advisor

ups_mond and ups_conf help

I think I've asked this before... but is there any way to run a script before a UPS unit shuts the system down? It's a Jamaica enclosure. I did a cat on the /etc/ups_conf file and I get:

shutdown_delay_mins:10
shutdown_timeout_mins:10
upstty:/dev/tty1p0:SOLA

What I need to do is run a script I wrote called DBALLDOWN that brings all of our databases down "gracefully"....
3 REPLIES 3
Stephen Keane
Honored Contributor

Re: ups_mond and ups_conf help

The UPS monitor will call the first executable it finds called shutdown in its PATH. In theory you could write a script called shutdown, that wraps the "real" one, but calls your script DBALLDOWN first?
Denver Osborn
Honored Contributor

Re: ups_mond and ups_conf help

ups_mond will initiate a "shutdown -h", so shutting down the db instances could be part of your normal shutdown scripts in /sbin/init.d. However if the shutdown hangs before the db is brought down, it will wait 10 mins (per your config) before issuing a reboot w/ halt to bring the box down.


-denver
Kent Ostby
Honored Contributor

Re: ups_mond and ups_conf help

Take a look at this thread which addresses this issue and has a sample shutdown script:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=132743
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"