[CentOS] Power Fail Protection Update

Thu Aug 17 13:29:46 UTC 2017
ken <gebser at mousecar.com>

On 08/16/2017 02:31 PM, John R Pierce wrote:
> in general, there's two power save states, 'Standby' aka 'Sleep', 
> where the system state is held in RAM, but the CPU and peripherals is 
> shut down and sleeping, and "Hibernate" where the ram is saved to disk 
> and the system is completely powered down.

That's what I thought too, until I read "man rtcwake" and discovered 
there are five standby modes.  A major problem-solver in this context 
would be some code added to that to allow a network connection to 
communicate with a UPS or server.  Given that Wake-on-LAN wouldn't be 
necessary.


>
> In sleep, if the power is lost, then you'll need to reboot when the 
> power comes back up.   The system is using very little power, so your 
> UPS should last much longer.
>
> In hibernate, you can restore when the power returns. Hibernate, 
> however, takes a few more seconds to wakeup, so people often use Sleep 
> as it wakes up relatively instantly.
>
> In neither of these states will the system be able to listen to ANY 
> network traffic, as the processor is simply not running.   The one 
> exception is Wake-On-Lan aka WoL.    You probably COULD configure a 
> master always-on NUT box to send WoL to a list of such systems, wait a 
> suitable amount of time for them to come back to their senses, then 
> send them Hibernate commands via NUT.
>
> Utilizing WoL requires configuration on the target hardware to 
> recognize and accept the WoL, this is typically done at the BIOS 
> level, and only works if the system supports WoL in the first place.   
> WoL commands can typically only be sent over the same local network 
> segment, as they are layer 2 packets sent to the MAC address of the 
> target.
>