use this command :
machstat -f

which generally gives the following output:
0 0 0

There is no documentation about that command … By looking into /usr/lib/boot/bin/rc.powerfail_chrp, we can assume this :

The first digit equals to :

0) => System under normal power conditions
1) => System facing non-critical cooling problem
2) => System facing non-critical power problem
3) => System facing severe power problems which require system shutdown
4) => System facing critical problems and the system will be halted immediately.
5) => We cannot handle this situation. Just issue syncs to ensure filesystem consistency and break. Continue to wait out till system shutdown.
7) => We cannot handle this situation. Just issue syncs to ensure filesystem consistency and break. Continue to wait out till system shutdown.

The second digit equals to :

1) => Immediate shutdown of the system
2) => Shutdown will proceed after the wait time

The third digit equals to the version (version of what exactly ? epow ?)

Advertisements