Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 9082
  • Last Modified:

APC Powerchute Network Shutdown config example needed

Have APC SU3000 ups protecting a rack of Solaris, Linux, Netware servers.  Have network card in ups, have installed APC Powerchute Network Shutdown (PCNS) 2.2.1.  There is an event for on-battery and another for input power restored.  Nothing else to indicate that the UPS has issued a shutdown or the ups battery low, etc.  No config options for time to wait before taking action.  I can handle all this in script, but once my script would start, there is no way to tell the PCNS to not order a shutdown of the UPS.  With all the options available at the UPS and with Powerchute Business Edition, this seems pretty primitive.  Am I missing the boat?  What have others done?  Thanks.
  • 2
  • 2
1 Solution
All I do is install all the software that comes the APC  UPS. I then run through all the setup's and config it accordingly.
Did you install all the powerchute software on one of the systems that its hooked up to via serial or USB cable???
zardonAuthor Commented:
If the UPS was protecting a single server, the server would get APC's Powerchute Business Edition Agent and maybe the Business Edition Server also.  The agent on the protected server would talk to the UPS with either serial or USB cable.  I would be happy.  In my current situation the UPS is protecting a whole rack.  If the UPS goes to battery and my thresholds are exceeded, I want to gracefully shut down the Solaris, Netware, Linux, and Windows 2003 servers in the rack.  If the UPS were connected to one of the servers with serial or UPS, then that server, running the PCBE Agent software, would have to notify all the other servers to shutdown.  For a number of reasons this is impractical in my situation, so I opted to install a network card in the UPS and use the APC Powerchute Network Shutdown (PCNS) software.  This software is (or will be) installed on each of the servers in the rack.  The PCNS on each server registers with the UPS network card and in theory, the network card in the UPS then notifies each of the servers when bad things happen.

Protecting a single server with the PCBE Agent and Server is sensible to configure.  You can configure like this:
on-battery - ok, don't panic, just wait and see if power comes back.
If input power returns - ok false alarm.
If battery life is down to X minutes, then go ahead and tell the server to shut down.
The server can start shutdown which will take Y minutes and tell the UPS to shutdown in Y + 2 minutes.

With the PCNS things are a little different.  In the above scenario, the only event the servers with PCNS will see is the initial on-battery.  Each of the servers has to know (or be told by me) how long to delay before starting a shutdown.  The smarts built into the UPS to know about the various delays and battery time remaining is wasted.   I must have the servers launch a shutdown script on that on-battery event.  Then I must write that shutdown script for Solaris, Netware, Linux, Windows and have it delay for some period of time before actually doing the shutdown, also watching for an off-battery event to cancel the whole thing.  This is what bothers me and I hope I am not seeing/understanding the configuration options and someone can enlighten me.

zardonAuthor Commented:
I did further research and answered my own question.
KCDean, thanks for trying to get me going, but I was dealing with PCNS (Powerchute Network Shutdown) software and not the Personal or Business edition.  The connections are network and not serial or UPS.

Config notes for PCNS 2.2.1 on Solaris on SPARC architecture
The config concepts will be similiar for Linux, Windows and Netware.

1st a note about installation.

   A graphical interface is required for installation! ... bummer

   When running the install script, you must be logged in as root.  NOT su'd to root.
   This can be on the console (graphical) or by xterm (ssh with x11 forwarding).

   Failure to observe these rules will result in installation failure with messages
   that the "/usr/bin/java -cp .:yada:yada load" execed ok, but the wizard failed to
   start correctly.

   For remote install by ssh, this will mean enabling x11 forwarding and allowing
   root login.  If necessary, change the /etc/ssh/sshd_config file and restart the
   /etc/init.d/sshd to enable this stuff, then when done, change the config back and
   restart the sshd again.

After PCNS is installed, the following will be true:
   o  starts on boot via /etc/rc2.d/S99PowerChute
   o  when shutdown occurs, PCNS uses the following command:
            which does /usr/sbin/shutdown -y -g0 -i0
   o  all events are configured for logging ony
   o  the undocumented default (maybe "poorly documented default" would be a better choice
      of words) action of PCNS is to shutdown the server on receipt of a low-battery event.
      This is not configurable.  PCNS doesn't even show low-battery event as a config item.
      The UPS will be configured to delay after sending this event.  The delay may be something
      like 5 minutes.  (The time is configurable in the UPS).  At the end of this delay, the UPS
      will turn itself off.

If it is desired to cause the system to shutdown earlier or for other specific events, then the PCNS config can be used to specify that option.

If configuring for a shutdown on other events, an option is to tell the UPS to shutdown.  Use this option with extreme caution as other servers may not anticipate this and may suffer ill effects.

If the delay time after the low-battery event (set and observed in the UPS, not PCNS) is not long enough to ensure the server shuts down cleanly, then extend the delay in the UPS or configure PCNS to shut down on on-battery event and use a script to control the timing of the shutdown.

If some applications cannot be shutdown with a kill script in the /etc/rcX.d, then configure PCNS to use a shutdown script to get the job done.

After PCNS actually does the shutdown, this will leave the system at the OPB prompt (Sun SPARC equivalent of BIOS).  The system will need to be manually rebooted (by typing boot) or the power has to removed and reapplied to cause an automatic boot (OBP auto-boot? yes or true).  This does leave a window of approximately 5 minutes (UPS delay time after low-battery event) during which the system may have been commanded to shutdown, but then the utility power returns and the UPS does not actually drop the power to the system.   In this case, the system MUST be manually booted.  This is possible reason to configure PCNS to tell the UPS to turn off.
Good to know you got it working that's the most important thing :)
PAQ / Refund
ee ai construct, community support moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now