On Jun 28, 2015, at 10:49 AM, Sundeep Mediratta <[email protected]> wrote:

> I think the high CPU usage was caused by the native OS X driver crashing and 
> not working properly. The native driver was not sensing the UPS going on 
> battery or any change in battery percentage.

As you can imagine, if the native driver does not see a change, the macosx-ups 
driver will not, either. Unfortunately, there is no timestamp on the data from 
the OS, so I am not sure if there is anything we can do to detect that 
condition.

> Unplugging the USB and then plugging it back again made the native driver 
> come back up again properly. Restarting the macosx-ups driver seems to get 
> back to normal CPU usage. I will monitor and see how it goes, but it seems 
> the native yosemite driver is flaky. Or maybe the UPS is flaky. Will monitor 
> and see how it goes.

If you do see 100% CPU usage on the NUT driver in the future, I would be 
interested in seeing a profile sample to see where it is spinning. Activity 
Monitor -> CPU tab; click on the process, and under the gear icon, choose 
"Sample Process".

Another potential problem that you might see is that the driver will trigger an 
assertion and exit when the UPS is unplugged. Theoretically, this could be 
fixed with a launchd plist that restarts the driver, but the usual way to 
handle this in NUT is to mark the data as stale, and wait for the UPS to 
reappear. (Does MacPorts use a launchd plist?)

> May have to attach the UPS to the linux machine and use the mac as a client, 
> however it is easier to use the mac with the native control panel if the 
> native driver works OK.

Something that has been on my TODO list for a while is a System Preference pane 
for NUT that would connect out to upsd running on another system, and present a 
virtual UPS object to Mac OS X. GUI programming is not my forte, but if you 
know anyone else interested in making this happen, let me know.

-- 
Charles Lepple
clepple@gmail




_______________________________________________
Nut-upsuser mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to