Monitoring/logging 110V power outages?
-
AES - 17 June 2005
Looking for a way to monitor and log power outages on the 110V residential electrical service that the ac adapter of a Mac is plugged into -- including any short-duration dropouts long enough to cause electric clocks or appliance display panels to reset.
Is there any way to make the computer itself (e.g., Mac iBook) do the sensing and recording? There must be some system variable that tells the Battery Charge menu bar icon whether the ac adapter is present or not. Could that variable be read out for use in other programs?
If so, would the response of the ac adapter to a short power glitch be fast enough, or would the output DC voltage from the adapter have a sufficiently long droop time that short ac transients would be missed? (I'm guessing that short transients would likely not be sensed.)
-
Troubled Tony - 18 June 2005
Just get yourself a zero-millisecond transfer UPS and protect it.
-
Matthew Russotto - 18 June 2005
[...](I'm guessing that short transients would likely not be sensed.)
You're right; short transients won't be sensed, there's way too much capacitance. You can certainly get the data from the Power Manager, but it won't be what you need. In the Good Old Days I'd suggest a monitoring circuit tied in to a serial port's DTR line (could be as simple as a small light and a photosensor), but nowadays there's no such simple interface available.
There's no such thing as a free lunch, but certain accounting practices can result in a fully-depreciated one.
-
Randy Howard - 18 June 2005
Most decent UPS products have monitoring software that will log such outages, as well as protect downstream products from anything but long-term dropouts. They usual connect via serial cable or USB to a computer and log the results there.
I don't know which brands have monitoring software for the Mac though. APC's website is a good place to start looking.
Randy Howard (2reply remove FOOBAR)
"I don't really care about being right you know,
I just care about success." --Steve Jobs -
Graham Miln - 18 June 2005
I don't know which brands have monitoring software for the Mac though. APC's website is a good place to start looking.
Our software maybe what you are looking for. :-)
DssW Sleep Monitor - monitors energy and power events
http://www.dssw.co.uk/sleepmonitor/Regards,
Graham
mailto:support@dssw.co.uk
http://www.dssw.co.uk/ Mac energy saving and power management software -
Randy Howard - 19 June 2005
Wow, I'm sorry I brought on the spam.
DssW Sleep Monitor - monitors energy and power events <spam URL snipped>
Actually, from the web description, it does nothing like what I was describing.
Randy Howard (2reply remove FOOBAR)
"I don't really care about being right you know,
I just care about success." --Steve Jobs -
Graham Miln - 19 June 2005
Randy, sorry you interpreted my posting as spam. I believe my post to be on topic and helpful to the original poster.
The original poster, AES, wanted software that could record the battery level and ac/battery status information. The software I mentioned did exactly that.
Sincerely,
Graham
mailto:support@dssw.co.uk
http://www.dssw.co.uk/ Mac energy saving and power management software -
AES - 19 June 2005
Yes, that's exactly the way I interpreted it, and the software looked quite interesting.
The one thing I wasn't sure of was whether the software (or the Mac's ac adapter itself) could respond fast enough to sense and capture the kind of fraction of a second glitches in the mains power (that's the British term, right?) that plague us at times -- just enough to cause lots of appliances to reset, barely enough to even make the lights dim.
--AES
-
Graham Miln - 19 June 2005
The software will record any messages sent by the battery or power supply. I doubt if the hardware can respond quickly enough to register sub second events. For outages of more than a second will be captured.
'Mains power' is the phrase used in the United Kingdom. :-)
Kind regards,
Graham
mailto:support@dssw.co.uk
http://www.dssw.co.uk/ Mac energy saving and power management software -
David C. - 19 June 2005
AES <siegman@stanford.edu> writes:
Looking for a way to monitor and log power outages on the 110V residential electrical service that the ac adapter of a Mac is plugged into -- including any short-duration dropouts long enough to cause electric clocks or appliance display panels to reset.
Is there any way to make the computer itself (e.g., Mac iBook) do the sensing and recording? There must be some system variable that tells the Battery Charge menu bar icon whether the ac adapter is present or not. Could that variable be read out for use in other programs?
If so, would the response of the ac adapter to a short power glitch be fast enough, or would the output DC voltage from the adapter have a sufficiently long droop time that short ac transients would be missed? (I'm guessing that short transients would likely not be sensed.)
Don't know about via a laptop's power brick, but I know you can do this if you have a UPS attached.
With my UPS, connected to the Mac via USB, every time it switches to/from battery, I get entries like the following in my system log:
Jun 19 10:12:55 mymac configd[89]: PM UPS Alert:
External power has been removed; Running off UPS battery. Jun 19 10:13:05 mymac configd[89]: PM UPS Alert:
External power has been restored to system.So all I'd need to do for this kind of monitoring would be to watch the system log.
I don't know if similar messages are provided when a laptop's AC power is attached/removed. This would be the first place I'd look. If appropriate messages are logged, then it's a really good starting point. You can either just read the syslog directly, or a program/script can do it for you.
-- David
-
AES - 19 June 2005
Previously, David C. wrote:
With my UPS, connected to the Mac via USB, every time it switches to/from battery, I get entries like the following in my system log:
Jun 19 10:12:55 mymac configd[89]: PM UPS Alert:
External power has been removed; Running off UPS battery. Jun 19 10:13:05 mymac configd[89]: PM UPS Alert:
External power has been restored to system.So all I'd need to do for this kind of monitoring would be to watch the system log.
Thanks, that's very useful -- and I take it this means the UPS is sensing loss of 110V power **to itself**, not just to the Mac.
Do you have any sense of how quickly the UPS senses loss of power? It's the very short momentary glitches, just enough to reset all kinds of clocks and appliances, rather than longer outages that are plaguing me (looks like the one cited above was about 10 sec duration).
Thanks again.
-
David C. - 20 June 2005
Correct. The UPS switches from line power to battery a few miliseconds after line power goes away. It switches back to line power when line power is restored. (That's what UPS's are supposed to do). UPS's with management capability report these switchovers to the computers that are monitoring them.
The one I use (an APC SmartUPS) reports these events (and many others) via USB and a serial interface to any computer that's connected. Software in the computer watches for these reports and acts appropriately. Appropriate action is usually to write an entry to the syslog and perform a shutdown when the battery runs too low.
MacOS 10.3 has built-in software to handle these events. (At least 10.3.9 does. A straight 10.3 install from my CD doesn't show the UPS page of the EnergeySaver control panel, so I assume the feature was added in an update somewhere.)
Do you have any sense of how quickly the UPS senses loss of power? It's the very short momentary glitches, just enough to reset all kinds of clocks and appliances, rather than longer outages that are plaguing me (looks like the one cited above was about 10 sec duration).
The UPS itself will sense transients extremely fast - on the order of miliseconds. But the syslog doesn't show outages of such short duration. I don't know what the minimum outage duration is. I also don't know if the interval is a function of the software in the UPS or in MacOS.
The outage in my report was of a 10s duration. Since I had not had an outage in several weeks, there was no entry in my syslog. I forced the creation of a log entry using the UPS's self-test button. A self test on my UPS switches everything over to battery power for 10 seconds.
-- David
-
Gray Shockley - 17 August 2005
By the (old) strict definitions, an UPS has no transfer time whatsoever. It's always "on". The equipment connected to it is /always/ run from the "conditioned" AC (117 sine wave).
A SPS (Standby-Power-Supply) does.
++ gray
Download Power Manager and start saving.