Skip navigation

UPS management software (using 1 UPS for 3 servers)

4166 Views 10 Replies Latest reply: Jan 3, 2014 4:23 AM by clepple RSS
JeffMurchison Level 1 Level 1 (20 points)
Currently Being Moderated
Jul 28, 2011 8:40 AM

Is there any UPS management software that would allow me to execute applescript or send remote commands? I have an APC UPS attached to one of my xserves via USB, and it is detected just fine and allows me to set the shutdown settings properly, but I want to shutdown that xserve as well as my 2 other xserves when the power goes out.

Mac OS X (10.6.7)
  • John Lockwood Level 5 Level 5 (5,080 points)

    JeffMurchison wrote:

     

    Is there any UPS management software that would allow me to execute applescript or send remote commands? I have an APC UPS attached to one of my xserves via USB, and it is detected just fine and allows me to set the shutdown settings properly, but I want to shutdown that xserve as well as my 2 other xserves when the power goes out.


    APC allegedly still produce software for Macs to let them monitor the UPS over the network. In theory if you install this on each server, they would all be able to use that to trigger a shutdown. However the software is commandline only and I years ago lost all trust in APC software due to their pitiful Mac support.

     

    See

    http://www.apc.com/tools/download/software_comp.cfm?sw_sku=SFPCNS300&id=127&fami ly=&part_num=&swfam=127&tsk=

     

    However there are two other available approaches.

     

    Firstly there is a commercial tool available from Equinux called APCTracker. This is a proper GUI tool, and easy to use but unfortunately their pricing scheme is insane as you have to pay per client, and not per UPS, this means if you have several servers it becomes extremely expensive. See http://www.equinux.com/us/products/apctracker/index.html

     

    Secondly, one could in theory download and install a version of the free NUT (Network UPS Tools) software. See the main page at http://www.networkupstools.org/index.html and an admittedly old but still helpful Mac specific page at http://trac.networkupstools.org/projects/nut/wiki/NutOnMacOSX

     

    With NUT, what you do is have the UPS connected to one computer which then acts as a NUT server, the other computers then run the NUT client and when there is a powerfailure the NUT server tells them.

     

    As an example the NetGear ReadyNAS (NAS server) uses a built-in copy of NUT to let more than one ReadyNAS unit monitor the same single UPS connected via USB cable to just one of the ReadyNAS boxes. I have two ReadyNAS Pro units with one connected via USB to an APC UPS, and the NUT software lets the second ReadyNAS auto shutdown by listening to the NUT server on the first ReadyNAS.

  • John Lockwood Level 5 Level 5 (5,080 points)

    JeffMurchison wrote:

     

    Thanks for the suggestions.

     

    I looked at APC's software. I can't use the Powerchute Network Shutdown as I don't have a network management card for the UPS.

     

    APCTracker, you're right, seems like a last resort due to the cost.

     

    I've got NUT installed on one of my xserves but I can't for the life of me figure out how to configure it. I followed that guide before but I guess I have the wrong port because when I try to start NUT it says "unable to open /dev/tty.usbserial: no such file or directory"

    I would be guessing that /dev/tty.usbserial maybe the wrong choice.

     

    Are you connecting to the UPS via a USB cable? The XServes have a built-in DB9 serial port which is /dev/tty.serial actually just checked and I think NUT only works via USB.

     

    Do a ls of /dev to see what tty devices are listed. As an example I have a USB modem on one of my XServes which shows up as /dev/tty.usbmodem1a21 it maybe that because there are multiple USB ports and sometime multiple USB buses/hubs it might like my modem example have some additional identifiers.

     

    The other possibility that occurs to me is that it might be a permissions issue. It maybe that you need to run NUT under the root (superuser) account. So starting it from the commandline with sudo in front of it might help. Or switching to the root account and doing it from there.

     

    If your using the old style /Library/StartupItems approach to auto-start it, then make the files and folder owned by root.

    I am guessing you are using a USB cable, having just done some Google searching for Leopard related info, it looks like Mac OS X itself is grabbing hold of the USB port so it can monitor the UPS and this is preventing NUT from accessing it as it is 'busy'. See http://libusb.6.n5.nabble.com/NUT-ON-OSX-10-5-td3072904.html

     

    I found the following http://www.readynas.com/forum/viewtopic.php?f=11&t=35314 but it is mainly talking about making Mac OS X a listener only with the ReadyNAS the NUT server. If you have not already found it have a look at this page http://pdb.finkproject.org/pdb/package.php/nut

     

    I have also found a possible totally different alternative called APCUPSd. See http://www.macupdate.com/app/mac/32917/apcupsd

  • John Lockwood Level 5 Level 5 (5,080 points)

    Reading further it does seem that because Leopard and Snow Leopard monitor USB connected UPS devices they are getting in the way of the NUT server software. This is down to the built-in ioupsd software which is monitoring the UPS for the benefit of the Energy Saver preference panel.

     

    I found quite a few people posting the same problem. The nearest I found to a solution was a post by Michael Wood here http://lists.apple.com/archives/usb/2010/Nov/msg00060.html which seems to be suggesting replacing a module. Other suggestions (which no-one has confirmed as working or not) is to disable /usr/libexec/ioupsd perhaps by moving it (and rebooting) or replacing it with a dummy file. Comments rightly pointed out that Mac OS X updates may replace it.

     

    His email address is I believe

    Michael Wood <esiotrot_at_gmail.com> maybe he can help you further.

     

    If you do get it working please let me and others know here.

  • John Lockwood Level 5 Level 5 (5,080 points)

    Your list did not include anything that would look like a suitable entry, it also did not include the /dev/tty.usbserial entry. Did you make this list when the UPS was actually connected? If you did not have the UPS connected then that entry would not exist.

  • clepple Level 1 Level 1 (0 points)

    Better late than never, I hope. As of version 2.6.5, NUT now includes a driver which monitors the built-in UPS driver (ioupsd) in Mac OS X:

     

    http://www.networkupstools.org/docs/man/macosx-ups.html

     

    However, you would need to use NUT's 'upssched' to schedule the slave Macs to shut down after a given amount of time on battery (macosx-ups does only signals On Line or On Battery, not Low Battery).

     

    I realize we haven't done much to tailor NUT to Mac OS X, but to be honest, there haven't been many requests. If you need help setting things up, feel free to subscribe and post a question to the nut-users list:

    http://www.networkupstools.org/support.html

     

    A slightly more out-of-the-box solution is to use apcupsd on both ends:

     

    http://apcupsd.org/

     

    It is mostly command-line based, but it has an OS X installer, and it also handles the process of detaching ioupsd (that John Lockwood mentioned earlier).

  • H2KFL Level 1 Level 1 (0 points)

    could you tell me how you did install NUT to OSX? I tried Fink and MacPort but got failed to set it up.

  • clepple Level 1 Level 1 (0 points)
    Currently Being Moderated
    Jan 3, 2014 4:23 AM (in response to H2KFL)

    H2KFL wrote:

     

    could you tell me how you did install NUT to OSX? I tried Fink and MacPort but got failed to set it up.

    "fink install nut" built the binaries, then I configured it similarly to this:

     

    http://trac.networkupstools.org/projects/nut/wiki/NutOnMacOSX

     

    (The ACL part is out-of-date, but the rest should still work.)

     

    What sort of errors did you get?

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.