Operating System - OpenVMS
1753406 Members
7222 Online
108793 Solutions
New Discussion юеВ

Re: program a serial port to UPS to detect power outage

 
Jim Strehlow
Advisor

program a serial port to UPS to detect power outage

Is there a "template" for writing an OpenVMS DCL process to monitor a serial port to an UPS (uninterruptible power supply) to detect a power loss to an OpenVMS AlphaServer and prepare for shutdown?

I would prefer a simple DCL solution; but it may be a VAX Basic or VAX C program.

Is there an "industry standard" white paper?

I am interested in the "general theory" that people use for determining:
- send OpenVMS mail when power outage is first detected
- other actions to do at first power outage
- how long do you wait before shutdown?
Do you wait five or ten minutes before committing to a shutdown?
- is there a SHUTDOWN and POWER OFF option for OpenVMS AlphaServer (DS10 or DS20) OpenVMS v7.3-1?

Thank you.

Jim, OpenVMS Systems Manager
8 REPLIES 8
Uwe Zessin
Honored Contributor

Re: program a serial port to UPS to detect power outage

Jim,
I think your first job is to find out how the UPS does the signalling.

- some of them just close a contact
That could be sensed by putting data transmit and receive on it. You just send out characters and see if they come back.

- some of them deliver a high/low signal
That could be sensed by monitoring one of the modem control lines.

- others really can 'talk'
Obviously you need information about the protocol.

So much for "industry standard" ...

--

It depends on your system what to do.

I don't think it makes sense to send mail, when the system goes down in 2 minutes anyway except for journaling purposes, but that can be built into the software, too. Some software I have seen sends broadcasts to all users that are logged-in interactively.

How long to wait? Well it does not make sense to shut down immediately - it could be a short power failure. On the other hand there must be enough 'juice' in the UPS so that you can shut down safely.


Having your system on UPS is fine, but remember that your infrastructure might need power, too. A VMScluster will not work if the nodes are powered, but the network switches are down.
.
Willem Grooters
Honored Contributor

Re: program a serial port to UPS to detect power outage

jim,

- how long do you wait before shutdown?
Do you wait five or ten minutes before committing to a shutdown?

This depends on your UPS. I know environmenst that have power for well over one hour, others that will last just for 5 minutes.

- is there a SHUTDOWN and POWER OFF option for OpenVMS AlphaServer (DS10 or DS20) OpenVMS v7.3-1?

If you have the facility for the UPS to signal - in whatever way - that main power is off, that will allow you to start SHUTDOWN.COM (hopefully, I never tried it non-interactively). I don't know POWEROFF by software on DS10 of DS20 so you may be out-of-luck there.

Furthermore, I agree with Uwe. you may need other hardware to to stay alive on UPS. On the other hand, if just these will stay on and the rest is taken off power (not behind UPS) you _may_ run into trouble with broken connections, open databases - all depending on your infrastructure. (It would be a nice thing if this extra could be shut off by software, over the LAN, after the open applications were shut down normally....)
So be aware what you take off the UPS.

Willem
Willem Grooters
OpenVMS Developer & System Manager
Keith Cayemberg
Trusted Contributor

Re: program a serial port to UPS to detect power outage

Hi Jim,

I know this is not a direct answer to your question, but I have collected several URLs concerning UPS Software solutions for OpenVMS that you might find useful. I've included them in the attached HTML file.

Cheers!

Keith Cayemberg
Keith Cayemberg
Consultant
Wipro Technologies
Richard Helmke_2
Occasional Advisor

Re: program a serial port to UPS to detect power outage

I have been asked to setup some DS20 and DS25 systems to monitor the Compaq R3000 and HP R3000 XR UPS that they were installed with. A quick search of the HP website doesn't uncover any VMS versions of the UPS software for these UPS systems. I think that these UPS might be Powerware boxes built for HP and Compaq, but they don't have VMS versions either -- just Windows, Linux and HP-UX versions.

Before I try to tackle the impossible, has anyone had any luck with "porting" some software for VMS to monitor these Compaq and HP branded UPS?

Thanks,
Rich, VMS SYSmgr
Wim Van den Wyngaert
Honored Contributor

Re: program a serial port to UPS to detect power outage

If it is connected to the network SNMP traps must be possible. Or to survive network unavailability (lost traps), use snmp dumps to detect changes.

Wim
Wim
John Gillings
Honored Contributor

Re: program a serial port to UPS to detect power outage

For a clean shutdown use:

SYSMAN> SHUTDOWN NODE

This can be directed at any node on your network to which you can set your environment (with privilege).

It can also turn off the power, if your hardware has soft power capabilities.

For example, to take out the whole cluster:

SYSMAN> SET ENVIRONMENT/CLUSTER
SYSMAN> SHUTDOWN NODE /POWER_OFF -
/MINUTES_TO_SHUTDOWN=2 -
/REASON="UPS Detected power failure" -
/REBOOT_TIME="When power is back" -
/REBOOT_CHECK/CLUSTER_SHUTDOWN

Ask the UPS hardware supplier if they have software for OpenVMS. Let them know there is demand and it will eventually happen.
A crucible of informative mistakes
Ian Miller.
Honored Contributor

Re: program a serial port to UPS to detect power outage

Brian Schenkenberger has done some work in this area. See his UPSHOT program at
http://www.tmesis.com/apc/registration.htmlx
____________________
Purely Personal Opinion
Richard Helmke_2
Occasional Advisor

Re: program a serial port to UPS to detect power outage

>Brian Schenkenberger has done some work in this area. See his UPSHOT

I talked to Brian "VAXman" Schenkenberger about monitoring ups equipment last spring. His excellent software 'only' monitors APC brand equipment.

Since the systems that I am supporting are hundreds of miles away, I've asked if the "optional" monitoring ports were installed on the Compaq R3000 and the HP R3000XR. So far I haven't found an online reference document for the R3000, but the R3000XR doesn't list Alpha OpenVMS as a supported platform.

Assuming that these UPS's have the monitoring hardware, I'll broaden the search a bit. I wonder if anyone has ported the Linux NUT ("Network UPS Tools") package, for instance, to OpenVMS. I'll report back if I find anything positive on something supporting these HP/Compaq UPS's.