Monitoring/logging 110V power outages?

Is there any way to make the computer itself (e.g., Mac iBook) do the sensing and recording?
AES wrote on :

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 replied on :

AES siegman@redacted.invalid wrote:

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

Just get yourself a zero-millisecond transfer UPS and protect it.

Matthew Russotto replied on :

In article siegman-B6DF7F.10581617062005@redacted.invalid, AES siegman@redacted.invalid wrote:

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.

[...]

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

Randy Howard replied on :

In article siegman-B6DF7F.10581617062005@redacted.invalid, siegman@redacted.invalid says...

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.

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.

Graham Miln replied on :

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

Randy Howard replied on :

In article support-48FF50.14025918062005@redacted.invalid, support@redacted.invalid says...

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

Wow, I'm sorry I brought on the spam.

DssW Sleep Monitor - monitors energy and power events

Actually, from the web description, it does nothing like what I was describing.

Graham Miln replied on :

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

In article MPG.1d1e5523cbb1ad6698ab01@redacted.invalid, Randy Howard randyhoward@redacted.invalid wrote:

Wow, I'm sorry I brought on the spam.

DssW Sleep Monitor - monitors energy and power events

Actually, from the web description, it does nothing like what I was describing.

AES replied on :

In article support-683B10.13154619062005@redacted.invalid, Graham Miln support@redacted.invalid wrote:

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

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 replied on :

In article siegman-FB88E6.21444818062005@redacted.invalid, AES siegman@redacted.invalid wrote:

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

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

David C. replied on :

AES siegman@redacted.invalid 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 replied on :

In article m24qbuh1mj.fsf@redacted.invalid, shamino@redacted.invalid (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. replied on :

AES siegman@redacted.invalid writes:

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.

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

Jeff Wiseman replied on :

Sorry to hijack this thread but I just gotta know :-)

David C. wrote:

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

Are you saying that the stock OS X software includes a tab for UPSs in the Energy saver panel?

You didn't install any software that came with the UPS, etc?

What does this control panel window look like (i.e., what functions does it support)?

If this is really true, it would imply that these functions are contained in the /System/Library/PreferencePanes/EnergySaver.prefPane files wouldn't it?

lusol replied on :

In comp.sys.mac.system Jeff Wiseman abuse@redacted.invalid wrote:

Sorry to hijack this thread but I just gotta know :-)

David C. wrote:

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

Are you saying that the stock OS X software includes a tab for UPSs in the Energy saver panel?

Later Panthers and Tiger, yes, ineed.

You didn't install any software that came with the UPS, etc?

Correct - it's builtin to Tiger.

What does this control panel window look like (i.e., what functions does it support)?

There's a new UPS tab, where it shows battery power, and let's you, say, shutdown the system after either 1) elapsed time, 2) battery % left or 3) battery time left (from memory!)

If this is really true, it would imply that these functions are contained in the /System/Library/PreferencePanes/EnergySaver.prefPane files wouldn't it?

cannot look now ..

Steve

Jeff Wiseman replied on :

lusol wrote:

In comp.sys.mac.system Jeff Wiseman abuse@redacted.invalid wrote:

Are you saying that the stock OS X software includes a tab for UPSs in the Energy saver panel?

Later Panthers and Tiger, yes, ineed.

Well nuts! I'm using 10.3.8 since everything after that seems to be having significant problems in one or more areas. I wasn't planning on upgrading beyond 10.3.8 for a while. It must have gone in 10.3.9.

You didn't install any software that came with the UPS, etc?

Correct - it's builtin to Tiger.

OK then. I'll wait until Tiger has evolved farther into the "no surprises" area before I try that one out.

So far I'm beginning to feel that 10.3.8 was the last really stable OS X release. There seem to be so many complaints about 10.3.9 and Tiger and I don't have the time to be chasing down release fixes and workarounds at present.

What does this control panel window look like (i.e., what functions does it support)?

There's a new UPS tab, where it shows battery power, and let's you, say, shutdown the system after either 1) elapsed time, 2) battery % left or 3) battery time left (from memory!)

Cool! So no more need for proprietary software for UPS control.

So the protocols to talk over a communications link to a UPS must have some standardization for a generic UPS tab to be used in the control panels. Great idea, but I wasn't aware that such a thing existed.

If this is really true, it would imply that these functions are contained in the /System/Library/PreferencePanes/EnergySaver.prefPane files wouldn't it?

cannot look now ..

Well, you wouldn't really see anything anyway other than the EnergySaver.prefPane would be dated newer than Dec 2004 :-) It has to be there though for the panel to behave in the fashion that has been described. Again, the surprise to me was that there must be a "standardized UPS control protocol" or somesuch in order for such a generic control panel to be implemented.

Most interesting. Thanks for the response!

Geoffrey F. Green replied on :

In article qXDte.7107$jX6.1356@redacted.invalid, Jeff Wiseman abuse@redacted.invalid wrote:

lusol wrote:

In comp.sys.mac.system Jeff Wiseman abuse@redacted.invalid wrote:

Are you saying that the stock OS X software includes a tab for UPSs in the Energy saver panel?

Later Panthers and Tiger, yes, ineed.

Well nuts! I'm using 10.3.8 since everything after that seems to be having significant problems in one or more areas. I wasn't planning on upgrading beyond 10.3.8 for a while. It must have gone in 10.3.9.

The UPS software was included in Mac OS X 10.3.3. See http://docs.info.apple.com/article.html?artnum=25711

A UPS (Uninterruptible Power Supply) panel is available in Energy Saver preferences, as well as a UPS menu bar item, when a UPS power management system is connected to the computer. Overall support for UPS systems is improved.

  • geoff
Grandpa Koca replied on :

Jeff Wiseman wrote:

Sorry to hijack this thread but I just gotta know :-)

David C. wrote:

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

Are you saying that the stock OS X software includes a tab for UPSs in the Energy saver panel?

You didn't install any software that came with the UPS, etc?

What does this control panel window look like (i.e., what functions does it support)?

If this is really true, it would imply that these functions are contained in the /System/Library/PreferencePanes/EnergySaver.prefPane files wouldn't it?

I'm using 10.3.8 with an APC brand UPS. The UPS tab is in the energy saver pref pane, as in "settings for: " pull down menu. It lets you adjust the amount of power time left before shutting down and the current UPS battery status. There is a script that it runs to shut down and you can add to or modify it.

lusol replied on :

In comp.sys.mac.system Jeff Wiseman abuse@redacted.invalid wrote:

lusol wrote:

In comp.sys.mac.system Jeff Wiseman abuse@redacted.invalid wrote:

Are you saying that the stock OS X software includes a tab for UPSs in the Energy saver panel?

Later Panthers and Tiger, yes, ineed.

Well nuts! I'm using 10.3.8 since everything after that seems to be having significant problems in one or more areas. I wasn't planning on upgrading beyond 10.3.8 for a while. It must have gone in 10.3.9.

You didn't install any software that came with the UPS, etc?

Correct - it's builtin to Tiger.

OK then. I'll wait until Tiger has evolved farther into the "no surprises" area before I try that one out.

So far I'm beginning to feel that 10.3.8 was the last really stable OS X release. There seem to be so many complaints about 10.3.9 and Tiger

Horse hockey pucks. Nuttin' honey wrong with 10.3.9, or 10.4.0. By the time you found something wrong with Tiger it was fixed in 10.4.1! ;) 10.4.2 they say is just around the corner.

For every .point upgrade of an OS there'll be something wrong, eh? Now, being wary of a major change e.g. Panther -> Tiger is another matter ...

Steve

Jeff Wiseman replied on :

Geoffrey F. Green wrote:

The UPS software was included in Mac OS X 10.3.3. See http://docs.info.apple.com/article.html?artnum=25711

I see, so the tab automatically appears when you connect to a UPS with a management system in it. Otherwise you can't even see it.

David C. replied on :

Jeff Wiseman abuse@redacted.invalid writes:

Are you saying that the stock OS X software includes a tab for UPSs in the Energy saver panel?

Not the original 10.3, but later patches add it. (I think someone said 10.3.3 first added it.)

You didn't install any software that came with the UPS, etc?

Correct.

What does this control panel window look like (i.e., what functions does it support)?

On the top, there's a pull-down menu named "Settings for:". Laptop users are familiar with this - it's how they can select different power prodfiles for when they're running off of line current vs. battery. When a supported UPS is attached, another entry on this menu named "UPS" appears.

When you select UPS, there are three tabs.

The first one, "Sleep" is the same as the normal Sleep tab. These settings are used only when the computer is running off of the UPS battery (typically only during a power outage).

The second tab, UPS, lets you see the UPS battery level and schedule an automatic shutdown when a configured number of minutes worth of UPS power are remaining. I have mine configured to shutdown when 10 minutes are left.

The third tab, "Options" is the same as the normal Options tab. These settings are used only when the computer is running off of the UPS.

If this is really true, it would imply that these functions are contained in the /System/Library/PreferencePanes/EnergySaver.prefPane files wouldn't it?

Well, the code for configuring the feature is in there. The feature itself is probably somewhere else.

-- David

lusol replied on :

In comp.sys.mac.system David C. shamino@redacted.invalid wrote:

Jeff Wiseman abuse@redacted.invalid writes:

Are you saying that the stock OS X software includes a tab for UPSs in the Energy saver panel?

Not the original 10.3, but later patches add it. (I think someone said 10.3.3 first added it.)

You didn't install any software that came with the UPS, etc?

Correct.

What does this control panel window look like (i.e., what functions does it support)?

http://www.lehigh.edu/~sol0/UPS%20SysPref.tiff

Steve

Jeff Wiseman replied on :

lusol wrote:

In comp.sys.mac.system David C. shamino@redacted.invalid wrote:

Jeff Wiseman abuse@redacted.invalid writes:

Are you saying that the stock OS X software includes a tab for UPSs in the Energy saver panel?

Not the original 10.3, but later patches add it. (I think someone said 10.3.3 first added it.)

You didn't install any software that came with the UPS, etc?

Correct.

What does this control panel window look like (i.e., what functions does it support)?

http://www.lehigh.edu/~sol0/UPS%20SysPref.tiff

Steve

Thanks for the screenshot Steve!

Now I need to get a UPS that'll work with this. The one I have now--a Tripp lite--only uses a DB9 serial connector. Right now, when the power goes off, I just know I need to shut down since I have no idea how long my battery will last. I'll be nice to be able to work longer before needing to shut down by just knowing how much charge there is left.

Gray Shockley replied on :

On Fri, 17 Jun 2005 13:33:21 -0500, Troubled Tony wrote (in article R-Wdnf0ek97sii7fRVn-2A@redacted.invalid):

AES siegman@redacted.invalid wrote:

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

Just get yourself a zero-millisecond transfer UPS and protect it.

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