On Tue, 18 Oct 2011 21:36:11 +0200
Paul de Weerd <[email protected]> wrote:

> On Tue, Oct 18, 2011 at 06:36:32PM +0200, Benny Lofgren wrote:
> | Apart from the suggestions elsewhere in the thread, in the good old
> days | I used to detect power outages by simply using a 12V power
> adapter and | soldering together a special cable connecting the +12V
> to the DCD pin of | an RS 232 serial connector.
> 
> A more modern approach (for those machines lacking a serial port)
> might be plugging in a USB device that needs external power (fed from
> the wallsocket) and using hotplugd.  When the device disappears - arm
> a timer to go down.  When the device comes back, stop the timer.

:-)
which particular device do you mean?  

> I have to admit, I still have to set this up for my own (cheap, non-
> managed) UPS, but I believe it should work.

I think your methodology is fllawed. think of the situations when you
have power loss, then shutdown is started and then power is back.
or situations where you starting machine after blackout and then there
is a blackout again...
With good ups you at least have 'switch off after some time is gone"
option. 



-- 
With best regards,
        Gregory Edigarov

Reply via email to