[Nut-upsuser] Apple Mac slave

Roger Price roger at rogerprice.org
Wed Jun 7 17:14:47 UTC 2017


On Wed, 7 Jun 2017, Robbie van der Walle wrote:

>             I am running NUT on a Synology NAS with attached a USB APC UPS.
>       Do you have upsd and upsmon running as daemons on the Synology DSM?
> Yes I have them both running on the Synology DSM: 
> root      7236     1  0 Jun01 ?        00:00:16 /usr/sbin/upsd
> root      7741     1  0 Jun01 ?        00:00:00 /usr/sbin/upsmon
> root      7744  7741  0 Jun01 ?        00:00:12 /usr/sbin/upsmon

I see upsd and the first upsmon are running as "root".  They are often run 
as user "nut" or "upsd".

>       Does the NAS shut down (and restart) correctly when wall power fails?
> Yes it does and also the other Synology Nas which is attached via the 
> network. It brings the Synology NAS in a safe-mode. 

I don't know the Synology NAS, but I guess that unless it is shutdown 
completely, it will still draw power.  Will the safe-mode drain the UPS 
completely, leading to a crash?

Out of curiosity, when you shut down the NAS, do you run the command
"upsdrvctl shutdown" ?  Do you see or hear anything to suggest that the 
delayed UPS shutdown has happened?

>       Is the Mac protected by the same APC UPS as the Synology NAS? Yes 
> it is. The power cable of the Mac is connected to the APC UPS. The 
> dataport of the APC UPS is connected via USB with the Synology NAS. 

Apart from these points, it looks as if NUT is running correctly on the 
Synology NAS.

Now for the Mac: You will need to have upsmon running on the Mac
with a MONITOR declaration of the form

    MONITOR UPS at NAS 1 <upsmaster> <password> slave

Setting "slave" says that upsmon on the Mac is to shutdown the Mac as soon 
as LB is detected in the NAS.

I suggest

  1. Shutting down on LB rather than on a timer since it's easier to set 
up.

  2. On the NAS, use command

    upsrw -s battery.charge.low=80 -u upsmaster -s sekret UPS

to set the low limit very high during testing.  This will speed up your 
testing.  You can reset it to something else later.

Roger


More information about the Nut-upsuser mailing list