On Wed, Oct 19, 2011 at 09:53:25AM +0300, Gregory Edigarov wrote:
| On Tue, 18 Oct 2011 21:36:11 +0200
| Paul de Weerd <we...@weirdnet.nl> 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?  

Ehr, well .. the USB device that you picked for this particular
purpose of course.  I think I misunderstood your question...

| > 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. 

You can build a lot of logic in the way you do this, including 'switch
off after some time is gone'.  Really the only thing you get with
'good ups' is an indication of how long your battery is going to last,
which might even resemble something close to reality if you're lucky.  

Don't get me wrong: 'proper' upses have a lot of benefits, but that's
mostly related to the ease of doing this controlled power down in case
of blackouts.

Paul 'WEiRD' de Weerd

-- 
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/                 

Reply via email to