Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
P is for Practical
 
PerlMonks  

Re^3: Most useless function.

by Anonymous Monk
on Feb 17, 2006 at 14:44 UTC ( [id://531053]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: Most useless function.
in thread Most useless function.

AFAIK, there's also a signal that gets sent in event of a power fluctuation. From there, you can use "ispoweron()" to tell the difference between a momentary power blip, and a real outage condition.

You'll only bother to poll when you've got a signal that said there was a potential outage issue, and then only to check to see if the situation has resolved itself (power back on or not). Depending on that knowledge, you can implement a variety of recovery policies (shutdown immediately; wait 10 minutes, then shutdown if the power is still out; etc).

From what I remember, it's not a useless function; albeit rarely very useful, either. AFAIK, it's been implemented on one of the BSD varients (BSDI Unix, perhaps?)

--
Ytrew

Replies are listed 'Best First'.
Re^4: Most useless function.
by spiritway (Vicar) on Feb 18, 2006 at 18:45 UTC

    Usually there is a non-maskable interrupt from a UPS that alerts the system to shut itself down while auxiliary power is working. Much would depend on the capacity of the UPS. Ideally you'll have time to flush buffers, close files, and clean up before the power dies completely.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://531053]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.