[Nut-upsuser] Mac Lion Server as slave

gforeman02 gforeman02 at gmail.com
Thu Mar 1 15:35:44 UTC 2012


Ok, got it working now.  So here is what I did:

1) Setup Macports (see site)
2) 'port install nut'
2)  'cp /opt/local/etc/upsmon.conf.sample /opt/local/etc/upsmon.conf'
4) update upsmon.conf as appropriate for your environment
3) add the plist below to /Library/LaunchDaemons
4) REBOOT.  I found that this was the only way to get the plist to load.  I am sure there is a better way, but this was easy and worked.
5) check that the process is running with ps -ef | grep upsmon

If you see something like:

    0   148     1   0  8:17AM ??         0:00.04 /opt/local/sbin/upsmon -D
  500   250   148   0  8:18AM ??         0:00.23 /opt/local/sbin/upsmon -D

You should be good since nut is running two processes.  One is for root and the other is for the nut user installed via macports.

Thank you for the plist details.  I was heading the right direction but missed the reboot step.  I had also raised the question over at macports so will update them as well.

Is it possible to get this (or similar) added to the web site?  It would have saved me time and it would help those just looking for a simple way to run the monitoring client only.

Thanks,
Greg


On Feb 29, 2012, at 11:32 PM, Charles Lepple wrote:

> On Feb 29, 2012, at 10:21 AM, Greg Foreman wrote:
> 
>> What is the best way to setup a Mac Lion Server as a slave?  A Centos 6 server runs nut and controls the UPS.  The yum epel install has a nut-client package that has the minimum required to get monitoring working (upsmon?)...I was wondering if there was some similar configuration for the Mac?
> 
> Since you don't need any drivers, you should be able to download the source code then run ./configure && make. (NUT will still attempt to detect and build a lot of stuff you don't need, but if the machine is new enough to run Lion, it should be quick.)
> 
> Creating a launchd plist with the right paths and such has been on my todo list for some time now. (That project has been stuck since my Mac has an APC UPS that usbhid-ups can't steal away from the built-in OS UPS monitoring code.)
> 
> The plist is probably going to look something like this:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
> <plist version="1.0">
> <dict>
>        <key>Label</key>
>        <string>org.networkupstools.upsmon</string>
>        <key>OnDemand</key>
>        <false/>
>        <key>ProgramArguments</key>
>        <array>
>                <string>/usr/local/ups/bin/upsmon</string>
>                <string>-D</string>
>        </array>
> </dict>
> </plist>
> 
> 
> -- 
> Charles Lepple
> clepple at gmail
> 
> 
> 




More information about the Nut-upsuser mailing list