Re: [Nut-upsuser] Apple Mac slave

2017-06-15 Thread Charles Lepple
On Jun 15, 2017, at 4:09 PM, Robbie van der Walle wrote: > What is the purpose of Boolean: SuccessfulExit? > All I remember is the comment on the next line: I did have to fiddle with permissions of config files - Fink currently builds NUT to run as user

Re: [Nut-upsuser] Apple Mac slave

2017-06-15 Thread Robbie van der Walle
Ok rebooted All running ok now. Great thanks a lot! In system.log Jun 15 21:38:54 c01 com.apple.xpc.launchd[1] (org.networkupstools.upsmon): Unknown key for Boolean: SuccessfulExit Jun 15 21:38:54 c01 com.apple.xpc.launchd[1] (org.networkupstools.upsmon): This service is defined to be

Re: [Nut-upsuser] Apple Mac slave

2017-06-15 Thread Robbie van der Walle
Ok did it again from scratch. I used the same plist file. sudo launchctl load /Library/LaunchDaemons/org.networkupstools.upsmon.plist Doesn’t return an error: system.log: Jun 15 21:38:54 c01 com.apple.xpc.launchd[1] (org.networkupstools.upsmon): Unknown key for Boolean: SuccessfulExit

Re: [Nut-upsuser] Apple Mac slave

2017-06-15 Thread Robbie van der Walle
I deleted the plist file and rebooted: sudo /sw/sbin/upsmon -D Network UPS Tools upsmon 2.7.4 0.00 fopen /sw/var/run/upsmon.pid: No such file or directory 0.044649 UPS: ups@ip address (slave) (power value 1) 0.081597 Using power down flag file /etc/killpower 0.162720

Re: [Nut-upsuser] Apple Mac slave

2017-06-15 Thread Charles Lepple
On Jun 15, 2017, at 10:31 AM, Robbie van der Walle wrote: > > Did you change anything in the plist or used mine ? > Copied and pasted from yours. If you run "sudo /sw/sbin/upsmon -D" from the command line, does it exit immediately? I did have to fiddle with

Re: [Nut-upsuser] Apple Mac slave

2017-06-15 Thread Charles Lepple
On Jun 14, 2017, at 1:54 PM, Robbie van der Walle wrote: > > > "http://www.apple.com/DTDs/PropertyList-1.0.dtd > "> > > > Label > org.networkupstools.upsmon > RunAtLoad > >

Re: [Nut-upsuser] Apple Mac slave

2017-06-14 Thread Charles Lepple
On Jun 14, 2017, at 9:12 AM, Robbie van der Walle wrote: > > But I cannot load it with the command: > > $ sudo launchctl load /Library/LaunchAgents/com.networkupstools.upsmon.plist > > /Library/LaunchAgents/com.networkupstools.upsmon.plist: Invalid property list > I

Re: [Nut-upsuser] Apple Mac slave

2017-06-14 Thread Robbie van der Walle
> To be honest, I haven't experimented much with this, but I saw a normal > shutdown/reboot when I just tried this from the command line (10.12): > > reboot~ Mon Jun 12 08:36 > shutdown ~ Mon Jun 12 08:35 > clepple ttys007

Re: [Nut-upsuser] Apple Mac slave

2017-06-12 Thread Charles Lepple
On Jun 11, 2017, at 7:15 AM, Robbie van der Walle wrote: > > I see only a reboot. Not a shutdown. But is this normal because shutdown -u > -h +0 is used? > To be honest, I haven't experimented much with this, but I saw a normal shutdown/reboot when I just tried this

Re: [Nut-upsuser] Apple Mac slave

2017-06-11 Thread Robbie van der Walle
> If notify-send is available on the Mac, then perhaps this will work: It is not installed. > In upsmon.conf on the Mac you need > > NOTIFYCMD /usr/sbin/upssched(or wherever this goes on a Mac) > NOTIFYFLAG ONBATT SYSLOG+EXEC Mac /sw/etc/nut/upsmon.conf, I have FINK installed on Mac.

Re: [Nut-upsuser] Apple Mac slave

2017-06-11 Thread Robbie van der Walle
>> What I wonder if the shutdown is done proper. Does the shutdown command use >> umount to prevent disk corruption? > > Yes, it prevents filesystem corruption, but I am not sure if it bothers to > save the desktop state. > > You can check the "last" logs to see if it was cleanly shut down: >

Re: [Nut-upsuser] Apple Mac slave

2017-06-10 Thread Roger Price
On Fri, 9 Jun 2017, Robbie van der Walle wrote: ... and also still open is the notification on the Mac. If notify-send is available on the Mac, then perhaps this will work: In upsmon.conf on the Mac you need NOTIFYCMD /usr/sbin/upssched(or wherever this goes on a Mac) NOTIFYFLAG

Re: [Nut-upsuser] Apple Mac slave

2017-06-09 Thread Robbie van der Walle
> Alternatively, on 10.12 and 10.11, there is a "-u" option to shutdown: > > -u The system is halted up until the point of removing system power, > but waits before removing power for 5 minutes so that an external UPS > (uninterruptible power supply) can forcibly remove power. This

Re: [Nut-upsuser] Apple Mac slave

2017-06-09 Thread Charles Lepple
On Jun 9, 2017, at 4:47 AM, Robbie van der Walle wrote: > >> Under System Preferences, Energy Saver, there is a setting Start up >> automatically after a power failure. >> Running sudo pmset -a autorestart 1 does the same trick. > > But unfortunately Mac stays . Step

Re: [Nut-upsuser] Apple Mac slave

2017-06-09 Thread Robbie van der Walle
>> After the first test and the NAS is restarted I had to change the setting >> battery.charge.low again to 80 > > Does the NAS DSM reset battery.charge.low to 10 or is it internal to the UPS? > You will have to experiment by disconnecting the UPS control lead from the > NAS and connecting

Re: [Nut-upsuser] Apple Mac slave

2017-06-09 Thread Robbie van der Walle
>> After the first test and the NAS is restarted I had to change the setting >> battery.charge.low again to 80 > > Does the NAS DSM reset battery.charge.low to 10 or is it internal to the UPS? > You will have to experiment by disconnecting the UPS control lead from the > NAS and connecting

Re: [Nut-upsuser] Apple Mac slave

2017-06-09 Thread Roger Price
On Fri, 9 Jun 2017, Robbie van der Walle wrote: # NOTIFYMSG - change messages sent by upsmon when certain events occur # # You can change the default messages to something else if you like. # # NOTIFYMSG "message" # # NOTIFYMSG ONLINE "UPS %s on line power" # NOTIFYMSG ONBATT "UPS %s on

Re: [Nut-upsuser] Apple Mac slave

2017-06-09 Thread Robbie van der Walle
>> After the first test and the NAS is restarted I had to change the setting >> battery.charge.low again to 80 > > Does the NAS DSM reset battery.charge.low to 10 or is it internal to the UPS? > You will have to experiment by disconnecting the UPS control lead from the > NAS and connecting

Re: [Nut-upsuser] Apple Mac slave

2017-06-09 Thread Robbie van der Walle
>> 7. No they didn’t restart. I know there is a setting on the NAS to activate >> this. I will check and try again. > > Not sure for the NAS, but for the Mac, it is probably something like this: > > sudo pmset -a autorestart 1 > > There is also usually a checkbox in the Energy Saver panel

Re: [Nut-upsuser] Apple Mac slave

2017-06-09 Thread Roger Price
On Thu, 8 Jun 2017, Robbie van der Walle wrote: After the first test and the NAS is restarted I had to change the setting battery.charge.low again to 80  Does the NAS DSM reset battery.charge.low to 10 or is it internal to the UPS? You will have to experiment by disconnecting the UPS

Re: [Nut-upsuser] Apple Mac slave

2017-06-08 Thread Charles Lepple
On Jun 8, 2017, at 4:06 PM, Robbie van der Walle wrote: > > 7. No they didn’t restart. I know there is a setting on the NAS to activate > this. I will check and try again. Not sure for the NAS, but for the Mac, it is probably something like this: sudo pmset -a

Re: [Nut-upsuser] Apple Mac slave

2017-06-08 Thread Robbie van der Walle
> When you carry out tests to ensure that the setup is working well, you will > pull the power cord from the wall and wait until the UPS reaches LB. This > means waiting and wasting time. You can speed up the testing by setting LB > very high so that the UPS reaches it quickly. Later you can

Re: [Nut-upsuser] Apple Mac slave

2017-06-08 Thread Roger Price
On Thu, 8 Jun 2017, Robbie van der Walle wrote: The "upsrw" command contacts upsd, so it sounds like you should be able to add a user to upsd.users on the NAS, and then run something like this on the Mac:   upsrw -s battery.charge.low=80 -u upsmaster -s sekret UPS@synology

Re: [Nut-upsuser] Apple Mac slave

2017-06-08 Thread Mark Hansen
On 6/8/2017 7:44 AM, Robbie van der Walle wrote: The "upsrw" command contacts upsd, so it sounds like you should be able to add a user to upsd.users on the NAS, and then run something like this on the Mac: upsrw -s battery.charge.low=80 -u upsmaster -s sekret UPS@synology Per

Re: [Nut-upsuser] Apple Mac slave

2017-06-08 Thread Robbie van der Walle
> The "upsrw" command contacts upsd, so it sounds like you should be able to > add a user to upsd.users on the NAS, and then run something like this on the > Mac: > > upsrw -s battery.charge.low=80 -u upsmaster -s sekret UPS@synology > > Per

Re: [Nut-upsuser] Apple Mac slave

2017-06-08 Thread Roger Price
On Thu, 8 Jun 2017, Robbie van der Walle wrote: I suppose I have to use -u for user? Which user? and -p  for password?  Sorry, my typo, it should be upsrw -s battery.charge.low=80 -u upsmaster -p sekret UPS@NAS upsmaster is the "user" declared in the NAS file upsd.users in square

Re: [Nut-upsuser] Apple Mac slave

2017-06-08 Thread Robbie van der Walle
> Yes, See the User Manual http://networkupstools.org/docs/user-manual.pdf > chapter 6.3 "Configuring automatic shutdowns for low battery events”. > The NUT documentation is not always clear, and it looks as if the Synology is > even less clear. You must distinguish carefully between "system

Re: [Nut-upsuser] Apple Mac slave

2017-06-08 Thread Charles Lepple
On Jun 7, 2017, at 1:14 PM, Roger Price wrote: > > 2. On the NAS, use command > > upsrw -s battery.charge.low=80 -u upsmaster -s sekret UPS Robbie, The "upsrw" command contacts upsd, so it sounds like you should be able to add a user to upsd.users on the NAS, and then run something like

Re: [Nut-upsuser] Apple Mac slave

2017-06-08 Thread Roger Price
On Wed, 7 Jun 2017, Robbie van der Walle wrote: 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? I don’t know where to search to answer this. The

Re: [Nut-upsuser] Apple Mac slave

2017-06-07 Thread Robbie van der Walle
> I see upsd and the first upsmon are running as "root". They are often run as > user "nut" or "upsd”. Apparently Synology has implemented it standard like this. Upsmon.conf on the Synology NAS: RUN_AS_USER root I suppose this needs to be changed from a security point of view. > I don't

Re: [Nut-upsuser] Apple Mac slave

2017-06-07 Thread Roger Price
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 ?       

Re: [Nut-upsuser] Apple Mac slave

2017-06-07 Thread Robbie van der Walle
>> 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 ?

Re: [Nut-upsuser] Apple Mac slave

2017-06-06 Thread Roger Price
On Tue, 6 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? Does the NAS shut down (and restart) correctly when wall power fails? I am trying to connect and shutdown a Mac