Installation guide

Dealing with Power Failures
3-30 Fault Tolerant System Administration (R1004H) HP-UX version 11.00.03
Configuring the Power Failure Grace Period
The power failure grace period is the number of seconds that the system waits after
a power failure occurs before it begins an orderly shutdown of the system. If
power is restored within the time specified by the grace period, the system does
not shut down. The default grace period is 60 seconds.
When the system boots, it starts a powerdown daemon that waits for a power
failure or a system shutdown command and then performs an orderly system
shutdown. You specify how long you want the grace period to be by customizing
the command that starts the powerdown daemon in the /etc/inittab file. If the
grace period ends and the power has not returned, the powerdown daemon
invokes the command shutdown -h -y 0. For more information, see the
powerdown(1M) and shutdown(1M) man pages.
To configure the power failure grace period, do the following:
1. Edit the entry in the /etc/inittab file and specify the value you want for
the grace option (-g). If the entry does not exist, create it. The -g option
specifies the length of the grace period in seconds. The following sample entry
starts the powerdown daemon with a grace period of 2 minutes:
pdwn::respawn:/sbin/powerdown -g 120 #powerdown daemon
2. Invoke the new (latest) /etc/inittab settings. To do this, enter
# init q
3. Terminate the existing powerdown daemon. To do this, determine the
powerdown daemon process ID and kill that process, as illustrated in the
following example:
# ps -ef | grep powerdown
root 699 1 0 Apr 10 ? 0:00 /sbin/powerdown
user1 6339 6228 1 16:56:40 pts/ 0:00 grep powerdown
# kill -9 699
Within seconds, the init process spawns a new powerdown daemon with
your changes.
4. Verify that the new process ID was spawned, as illustrated in the following
example:
# ps -ef | grep powerdown
root 6346 1 0 17:01:13 ? 0:00 /sbin/powerdown
root 6358 6341 0 17:06:25 pts/2 0:00 grep powerdown
For more information, see the powerdown(1M), kill(1M), init(1M), and inittab(4) man
pages.