Operating System - HP-UX
1834637 Members
2638 Online
110069 Solutions
New Discussion

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

 
SOLVED
Go to solution
Pete Randall
Outstanding Contributor

Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

APC provides software called "Powerchute Network Shutdown" that is supposed to monitor the UPS and initiate shutdown before the batteries expire. Has anyone successfully installed/implemented this?


Pete

Pete
17 REPLIES 17
Steven E. Protter
Exalted Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

Shalom,

We tried to use this instead of an HP provided power solution. It did not work.

I've heard of others that succeeded in this task. Nothing is perfect. Good Luck.

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
Pete Randall
Outstanding Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

OK, let's try broadening the question:

Is anyone out there using an APC UPS?


Pete

Pete
Alzhy
Honored Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

Pete, I've hooked up UPS to HP-UX systems in the past but not APC nor a vPar'ed environment. If I remember correctly it was hooked up to a serial port acting as a TTY -- and the UPC has its own login. During Power Failures.. the UPS logs-in and initiates a shutdown.

Powerchute Network Shutdown I've heard is APC's networked UPS management solution. I think it works in conjuntion with APC UPS Network Management Card - there was a pitch months ago but we did not implement it.

Hakuna Matata.
Pete Randall
Outstanding Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

Steve, thanks.

Nelson, I, too, have hooked up a UPS via serial port, however, this doesn't appear to be an option nowadays [what's a serial port? ;^) ]. APC provides "documentation/installation instructions" but they apparently suffered in translation from whatever language the random thoughts were originally written in and include nothing hp-ux related so I'm stuck with a strictly manual shutdown scenario.

We're still attempting to get some sort of support from APC, but I thought surely there must be someone out there that's using an APC UPS and the associated Network Shutdown software.


Pete

Pete
OldSchool
Honored Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

Pete,

I've not used it, and the APC site is full of dead links, but I did scrounge this off the internet:

http://www.kt.agh.edu.pl/~miklesz/programs/PowerChute%20network%20shutdown%20Installation%20Guide.htm

It *might* be of some help.....
Pete Randall
Outstanding Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

Thanks, Old (or is that Mr. School??), that is apparently a newer version of the Install Guide that I was working from - not much better, but it does at least mention hp-ux!!


Pete

Pete
Bill Hassell
Honored Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

I have used the APC units and while they are far superior to other units (especially with the LAN card option), the only software they provide for HP-UX is some JavaJunk that I could never get to work. The serial port is an option if you want to write your own monitoring program but the port has a menu interface (unlike the HP/Sola units with simple commands). I would contact APC and escalate the problems. My guess is that they don't have any HP-UX machines to test.


Bill Hassell, sysadmin
Gavin Clarke
Trusted Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

Pete,

I thought we had APC PowerChute here once, I've looked for manuals and sadly can't find them.

We weren't using it for HPUX, can you get it to work on Windows then run a script from that machine or does it not work like that?

Hmmm not very helpful I'm afraid.

Cheers,

Gavin
Pete Randall
Outstanding Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

Boy, that's not very encouraging when even Bill Hassell couldn't get it to work. I ran out of time yesterday to work on it but I think the Install Guide that OldSchool pointed me to may be the answer. It still takes a lot of inspired interpreting to read enough info into the sparse amount provided but we'll see.


Pete

Pete
Bill Hassell
Honored Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

I did get through to APC support who gave me the working links to Java stuff. They also gave me links to SNMP MIBs which is nice for monitoring. Powerchute is simply PC software as near as I can figure out, and it is designed to shutdown PCs, not generate messages that can be scripted. Not unlike HP, APC orients their smaller products to PCs (including rack mounted units), and for really large datacenters, the assumption is that operations has figured out how to remotely shutdown systems separately from UPS notifications.

However, the UPS management card (aka, LAN card) provides a very nice set of web pages that could be parsed with web parsing tools such as Lynx, wget, curl, snarf. And a simple SNMP program could handle traps when an event occurs.


Bill Hassell, sysadmin
Pete Randall
Outstanding Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

Using creative interpretation of the document provided by OldSchool, I, at least, was able to install the software. Hopefully today I'll be able to do a controlled test. I'll let you know if it works.


Pete

Pete
Pete Randall
Outstanding Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

SUCCESS!!

I successfully tested today, shutting down a workstation from Powerchute Network Shutdown. Here's the installation/configuration summary:

1) I downloaded the latest client software from APC's web site, just in case.

2) Use your browser to connect to the management card's IP address and set the "Low-Battery Duration" to at least 5 minutes.

3) Ignore the "installation program must be run on the server console" note.

4) Use tar to extract the installation files from the pcns201.tar file downloaded in step 1.

5) Enter "java -cp .:pcns201.jar:swingall.jar:util.jar load" to install (after cd'ing to the directory where these files are located).

6) Follow along the install process, accepting the license agreement, specifying the install location, and filling in the IP address, the UserName and Password for the card.

7) The software should now be running (use ps -ef |grep java to check) and you connect to it from your browser by specifying the IP address and port number (xxx.xxx.xxx.xxx:3052)

8) Configure the client software by selecting "Configure Events" and setting the "UPS: On Battery" event to "Run Command File" and to "Shut Down System". This is where you specify how long you have to be on battery power before shutdown is initiated.

9) Then select "Configure Shutdown" and fill in the command file to run and how much time it takes to run said command file. You can also set it to turn off the UPS after shutdown, which I did, figuring that when power is restored, the UPS will come back on and the HP-UX machine will be rebooted.

I was a bit confused about what command file did what, so I made two: /pre-whoa and /whoa. The first, specified in step 8, simply announces the attention to shut down. The second, in step 9, actually invokes the shutdown.

By default, the install puts startup/shutdown in /etc/rc.APCpcns and then invokes from /etc/inittab, I'm going to move it to comply with the /sbin/init.d paradigm, but that should be the last step that I can think of.

Good luck to anyone who needs to attempt this.


Pete


Pete
OldSchool
Honored Contributor
Solution

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

Well done sir...

Creative interpretation of the docs, indeed.
Pete Randall
Outstanding Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

OldSchool,

I'm glad you replied, I really felt like you deserved more points than I had given you. Without your improved Install Instructions, I never would have figured it out. Well, maybe eventually, but you were a big help.

Have a bunny on me!!


Pete

Pete
Pete Randall
Outstanding Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

After my supposed success, I did some further testing with this and the "Command File" that I am trying to invoke (in step 8 and step 9 above) never runs. Somehow the software issues a shutdown or perhaps even just turns the machine off, since I don't seem to see the rc shutdown scripts running.

I'm more confused than ever. Is there an HP software solution that would work with APC ups's or am I stuck with Powerchute?


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

Shalom Pete,

My understanding is you are stuck with powerchute (or however they spell it).

I've talked to a few non-ITRC'ers. How it works with vpars, or if it works with vpars I'm not sure. All the people I know that have APC use powerchute.

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
Pete Randall
Outstanding Contributor

Re: Automatic shutdown of APC-UPS protected rp7410 (w/ VPars)

At long last I got the chance to return to this and do some more testing. The workstation I was testing with (an antique) got annoyed with being bounced up and down like a yo-yo and refused to boot. I ended up having to re-load the OS.

So, rather than risk trashing my delicate antique workstation again, I loaded the software on my own workstation, following the above described procedure, then configured it, then pulled the plug on the UPS being monitored. The workstation shut down perfectly. The command files ran, the rc shutdown scripts were executed just as they should be and everything is working as advertised. I finally decided I don't need the command files anyway, since the normal, graceful shutdown takes care of everything properly. I have since loaded it onto a small server to ensure that Informix gets shut down as it should and that was successful too. This morning I'm removing the UPS monitor startup from /etc/inittab and placing it into /sbin/init.d where it should be, but I expect no problems with that.

Should you attempt this, be sure to print out (or at least refer to) the help file on the install CD (d:/PCNS/help.html). There is detailed information on the shutdown steps and the timing between steps, definitions of all the various delay times, descriptions of the various events that can be monitored, etc., etc., etc. Truly invaluable.


Pete


P.S. If you do decide to use a command file, there is a supposed requirement that the script be run with the bourne shell (/usr/old/bin/sh). That's what I tried when I did get the command files to run. I did not try again without the bourne shell so I can't say definitively that that is why they didn't run before, but they sure ran this time.

Pete