Handles RPA (RS/6000® Platform Architecture) specific EPOW (Environmental and POwer Warning) events and shuts down the system if needed, as part of EPOW event handling.
The rc.powerfail command is started by the /etc/inittab file when init receives a SIGPWR signal from the kernel. The rc.powerfail command uses ioctl() to determine the state of the system. The rc.powerfail command should be called only when an EPOW event has occurred.
EPOW class | Event handling done by rc.powerfail | Example |
---|---|---|
|
rc.powerfail warns the users currently logged onto the system through a cron entry which will be walled every 12 hours until the situation disappears. | Redundant Fan Faults. Internal Thermal Problems. |
|
rc.powerfail warns the users currently logged onto the system through a cron entry which will be walled every 12 hours until the situation disappears. | Redundant AC input fault. |
|
rc.powerfail initiates the system shutdown in 10 minutes unless the user has specified some other wait time through the -t option. | Ambient temperature approaching specification limit. |
|
rc.powerfail is expected to process this event in 20 seconds. In these cases, rc.powerfail warns the users currently logged onto the system and then immediately halts the system. | Loss of AC input: All the power sources have lost power. |
|
Since they should be handled in micro seconds, rc.powerfail will not be handling these events. If rc.powerfail gets control in these conditions, it will continue to wait out the wait time period. | All the fan systems have failed, non redundant power fault. |
Also in case of EPOW class 3 events, rc.powerfail will allow executing environment-specific scripts (if any) to be executed before system shutdown. These scripts will be located under /usr/lib/scripts/epow, and rc.powerfail will wait for 10 seconds, by default, for their completion. This wait time can be altered using the -c option. The value provided through the -c option will be taken as the wait time for these scripts, in seconds.
Item | Description |
---|---|
-h | Gives an information message containing the power status codes and the resulting action. The rc.powerfail -h command shuts down the system if needed, as part of EPOW event handling. |
-s | Does not do a system shutdown if there is a power failure in systems with either a battery backup or fan fault. The logged-on users still receive all the appropriate messages, but the actual system shutdown is left up to the system administrator. This flag has no effect if a critical power failure is detected. |
-t mm | Gives the number of whole minutes until system shutdown in the case of a primary power loss with battery backup or fan fault. This number should be equal to half the length of time guaranteed by the battery backup. This flag has no effect if a critical power failure is detected. |
-c ss | Gives the number of seconds to wait for the completion of any environment specify third party scripts to be executed by rc.powerfail, at EPOW 3 situations. |
If the system shuts down, no exit value is returned. Otherwise, the rc.powerfail command returns the following exit values:
Item | Description |
---|---|
0 | Normal condition. |
1 | Syntax error. |
2 | halt -q failed |
3 | shutdown -F failed. |
4 | An error has occurred. Shut your system down immediately using shutdown -F. |
5 | An undefined state. Call your Service Representative. |
Access Control: root only.
rc.powerfail -h
chitab "powerfail::powerfail:/etc/rc.powerfail -s >dev/console 2>&1"
The
next SIGPWR received by init will not cause a system shutdown
if a non-critical power failure occurs.chitab "powerfail::powerfail:/etc/rc.powerfail -t 30 >/dev/console 2>&1"
Assuming
the condition is not critical, the next SIGPWR received by init will
have a 30 minute delay until system shutdown. Item | Description |
---|---|
html |