 |
» |
|
|
 |
The simplest way to configure a uninterruptable power system
is to use SAM (/usr/sbin/sam). If SAM is not loaded on your system or if you
prefer to use the command-line interface, the following procedure
will guide you through the task. Familiarize yourself with the instructions
before getting started. Examine Table 8-2 “UPS Configuration Requirements ” to identify
the driver and interface card associated with the specific platform
to which you are configuring the UPS. Under virtually all circumstances,
the interface driver used by the UPS is already present in the kernel. Invoke ioscan for the tty class to display the hardware path, driver, and
device special file(s) available for the UPS. Your output might
resemble the following: /usr/sbin/ioscan -fun -C tty Class I H/W Path Driver S/W State H/W Type Description ================================================================ tty 0 56.0 mux4 CLAIMED INTERFACE /dev/tty0p0 /dev/tty0p1
|
In this (simplified) example from a Model 887, the multiplexer
card is installed in slot 14 (H/W Path divided by 4) and bound with the mux4 device driver. Device special files /dev/tty0p0 and /dev/tty0p1 are available. If an MDP or DDP is installed at the
MUX port, ioscan will show device special files for all the ports
available. As shipped, the console is configured to be plugged in at
port 0. The /dev/console file is equivalent to /dev/tty0p0. Thus, in this example, Port 1 (represented by /dev/tty0p1) can be used for the UPS. Edit the /etc/inittab file to activate the UPS monitoring daemon when
the system boots up. To do so, Remove the comment sign (#) from the UPS entry. Be sure the ups entry appears after the /sbin/rc entry, so that the ups_mond is started after the system logging daemon (syslogd). Note, the UPS is started with real-time priority
so that it does not get "starved" on a busy system. ups :respawn:rtprio 0 /usr/lbin/ups_mond -f /etc/ups_conf |
Add a comment sign (#) in front of the getty entry corresponding to the port used by the UPS.
For example, #ttp1:2:respawn:/usr/sbin/getty -h tty0p1 9600 |
Edit the /etc/ups_conf file to customize the UPS configuration for your
system. The etc/ups_conf file informs the monitoring daemon (/usr/lbin/ups_mond) which ports to monitor and how to react to UPS
status. The ups_conf(4) manpage documents the
required format and available options. Also, read carefully the guidelines
for setting shutdown options just ahead. shutdown_delay_mins:1 shutdown_timeout_mins:5 upstty:/dev/tty0p1 upstty:/dev/tty0p2:MSG_ONLY
|
To ensure that the UPS operates appropriately
to your system, review carefully the guidelines listed below concerning
how to set shutdown_delay_mins and shutdown_timeout_mins in the /etc/ups_conf file:
shutdown_delay_mins (one minute, by default) is the number of minutes
after loss of AC power is detected before HP-UX invokes shutdown -h. Increase this value if the site commonly experiences
momentary power interruptions greater than one minute for which
recovery of power is expected. On a large system, do not set the shutdown_delay_mins to a value larger than nine minutes.
HP guarantees the UPS to provide output power for up to fifteen minutes.
Large systems may take as long as five minutes to complete shutdown plux one minute for the shutdown grace period. Thus, to ensure that the UPS provides
power for the entire operation, figure maximum shutdown_delay_mins as fifteen minus six, or a difference of nine
minutes. shutdown_timeout_mins (five minutes, by default) is the number of minutes shutdown -h is expected to take. UPS terminates power supply
one minute after this value elapses. If shutdown does not complete in the time specified, the UPS monitor
initiates a reboot -h to halt the system. Increase shutdown_timeout_mins if shutdown takes longer than five minutes, including the
one minute grace period. Decrease shutdown_timeout_mins if shutdown takes less than five minutes. Small systems can
take advantage of this.
 |  |  |  |  | CAUTION: You must wait the full duration
of shutdown_timeout_mins before cycling power to the SPU, regardless of
whether AC power has been restored. Once activated, the UPS will
turn off after that period of time. |  |  |  |  |
If you are
configuring more than one UPS, list their device special files on separate
lines in priority order. Make sure the most important UPS (that
is, for the SPUs) is the first one listed. If a UPS governs peripheral devices and external
bus extenders, it should be configured to send and log messages,
but not to initiate a system shutdown. To use this option, set upstty for that UPS to MSG_ONLY. (If you are using SAM, MSG_ONLY is referred to as noncritical operation.) Print a copy of your /etc/ups_conf file so that you can refer to it when cabling the
UPS hardware. You will want to verify that the device special file
associated with upstty matches that used by the UPS. For example, upstty:/dev/tty0p1 specifies that the UPS is plugged into the second
port (p1) of an RS-232 MDP connected to an interface card
at card instance 0.
Bring the system down to a halt (shutdown -h), then turn power off. Install the UPS hardware,
following instructions provided in the hardware documentation. Also
see the cabling information provided in “Cabling
Guidelines ”, earlier in this chapter. Power up the peripherals, PowerTrust, then SPU.
On rebooting, HP-UX will configure all connected components. Everything
connected to the UPS will be protected against sudden power failure.
|