Operating System - HP-UX
1748202 Members
2976 Online
108759 Solutions
New Discussion юеВ

Shutting down HPUX on complete power loss

 
Bryan Strait
Advisor

Shutting down HPUX on complete power loss

We have an rx4640 with redundant hot-swap power supplies installed running HPUX 11.23.

There is a short period of time between loss of power to the power supplies and when the system actually goes down. Is it possible to utilize this time to do as much clean shutdown as possible? Is it possible to set the system up to shutdown cleanly when upon powerloss to both power supplies?

One method to do this would be to use EMS but was hoping to avoid this route if there is already an easier configurable way built in the OS.

Again, thanks so much.

Bryan
8 REPLIES 8
Senthil Kumar .A_1
Honored Contributor

Re: Shutting down HPUX on complete power loss

Hi,

I'm not too sure this might meet your purpose. Have a look at the following links..

http://docs.hp.com/en/939/KCParms/KCparam.PfailEnabled.html

http://docs.hp.com/en/B2355-90672/index.html

regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Bharat Katkar
Honored Contributor

Re: Shutting down HPUX on complete power loss

Hi Bryan,

It's an innovative idea but as of now i don't think it's possible to really utilise that fraction of time.

HPUX 11.31 is coming up with some proactive features so probably we can expect something similar to this.

Regards,



You need to know a lot to actually know how little you know
RAC_1
Honored Contributor

Re: Shutting down HPUX on complete power loss

You can to certain extent, but not worth the efforts. What you can do is put your scripts in ups.conf or similar file or in /etc/envd.conf. envd.conf will come into picture only when there are problems with physical env of a server like temp. etc. Not tried it though.
There is no substitute to HARDWORK
Bryan Strait
Advisor

Re: Shutting down HPUX on complete power loss

Thanks. I'll give it a look. To give a little detail in what I'm trying to do, I have an application which is doing some data exchange with a remote host. The machine is dedicated for this application. Knowing that the localhost is going down soon could really make the remote host a lot happier if the connection can be closed out cleanly. Proper HPUX shutdown is really a secondary desire and I realize threre's really not enough time for that. The power supplies on the rx4640 give about 5 seconds of power after power loss before the system goes down hard.
Yogeeraj_1
Honored Contributor

Re: Shutting down HPUX on complete power loss

hi bryan,

It is preferrable to use a ups monitoring software that would trigger a graceful shutdown before the UPS power runs out!

we have been using it for years...

hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
rick jones
Honored Contributor

Re: Shutting down HPUX on complete power loss

Long ago and far away the HP 3000's and HP 9000's had something called "power fail recovery." When power was lost, there was just enough time to make sure everything was quiesced (flushed to RAM IIRC) and then the battery kept the contents of the RAM live for long enough to "survive" "most" power failures A small but reasonable number of minutes.

If power came-back in that time, the OS would go through some rather nasty power failure recovery code - reinitializing I/O cards was some of the hariest part and go on its way.

It was complicated.

If the power went away for too long the system was fubar anyway.

A UPS is a _much_ better solution. It keeps the whole system going for a while, and gives enough warning that when its batteries are about to go the system can execute a nice clean shutdown. And that shutdown process can invoke your shutdown handler in rc.init.d or whatever the right thing is :)

there is no rest for the wicked yet the virtuous have no pillows
A. Clay Stephenson
Acclaimed Contributor

Re: Shutting down HPUX on complete power loss

And an even better approach is to have the UPS backed by a standby generator coupled to an automatic transfer switch. When you do that, the loss of normal AC power is a complete non-event. In fact, one could argue (and I do) that UPS shutdown scripts make the system more vulnerable rather than less because a bug in those scripts could trigger a false shutdown. This is really the only appoach to a truly highly available system.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: Shutting down HPUX on complete power loss

5 seconds is only for the CPU and there is very little that can be done for a clean shutdown. An emergency shutdown is to use:

reboot -qh

HOWEVER: this is a brute force kill -9 of every process (*NO* cleanup) and a quick sync of the disks. Yes, it will complete in just a few seconds but it completely depends on syncing all mounted disks. It will NOT perform a clean shutdown of network connections -- it is a system-wide kill -9. So databases will be left in indetermininate states, tempfiles won't be cleaned up, etc.

There is NO substitute for a good UPS. Remember that the computer is not just the rp4640, it is all the devices such as LAN, disks, tape drives, etc. Now if the data center doesn't have any power protection, then there's nothing you can do to cleanly shutdown the network connections -- the LAN will be dead. So you need to look at the entire system (including network appliances such as routers, switches and firewalls) when protecting the data. Note that modern UPS systems can signal the processor when power is gone (which would give you several minutes to cleanly terminate connections, notify users, etc) and then another notification when the batteries are almost gone (plenty of time for a reboot -qh).


Bill Hassell, sysadmin