I deleted the plist file and rebooted: sudo /sw/sbin/upsmon -D Network UPS Tools upsmon 2.7.4 0.000000 fopen /sw/var/run/upsmon.pid: No such file or directory 0.044649 UPS: ups at ip address (slave) (power value 1) 0.081597 Using power down flag file /etc/killpower 0.162720 debug level is '1' 0.538410 Trying to connect to UPS [ups at ip address] 0.540345 Logged into UPS ups at ip address fopen /sw/var/run/upsmon.pid: No such file or directory This is strange because the file exits. Let me check why this is happening. It would explain why the pid is not running. Kind Regards, Rob> On 15 Jun 2017, at 16:38, Charles Lepple <clepple at gmail.com> wrote: > > On Jun 15, 2017, at 10:31 AM, Robbie van der Walle <rvanderwalle at gmail.com <mailto:rvanderwalle at gmail.com>> 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 permissions of config files - Fink currently builds NUT to run as user "nobody", so I have the following non-default permissions: > > $ ls -l /sw/etc/nut > ... > -rw-r-----+ 1 root nobody 2177 Jun 15 08:42 upsd.users > -rw-r-----+ 1 root nobody 15455 Jun 15 08:50 upsmon.conf > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170615/85f17882/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3583 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170615/85f17882/attachment-0001.bin>
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 Jun 15 21:38:54 c01 com.apple.xpc.launchd[1] (org.networkupstools.upsmon): This service is defined to be constantly running and is inherently inefficient. sudo launchctl list|fgrep -v com.app PID Status Label ? 1266 0 org.networkupstools.upsmon ps -ef |grep upsmon 0 1266 1 0 9:38PM ?? 0:00.01 /sw/sbin/upsmon -D 0 1267 1266 0 9:38PM ?? 0:00.02 /sw/sbin/upsmon -D Let try to reboot my Mac and check. Kind Regards, Rob> On 15 Jun 2017, at 16:51, Robbie van der Walle <rvanderwalle at gmail.com> wrote: > > I deleted the plist file and rebooted: > > sudo /sw/sbin/upsmon -D > Network UPS Tools upsmon 2.7.4 > 0.000000 fopen /sw/var/run/upsmon.pid: No such file or directory > 0.044649 UPS: ups at ip address (slave) (power value 1) > 0.081597 Using power down flag file /etc/killpower > 0.162720 debug level is '1' > 0.538410 Trying to connect to UPS [ups at ip address] > 0.540345 Logged into UPS ups at ip address > > fopen /sw/var/run/upsmon.pid: No such file or directory > > This is strange because the file exits. > > Let me check why this is happening. It would explain why the pid is not running. > > Kind Regards, > > Rob > > > >> On 15 Jun 2017, at 16:38, Charles Lepple <clepple at gmail.com> wrote: >> >> On Jun 15, 2017, at 10:31 AM, Robbie van der Walle <rvanderwalle at gmail.com> 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 permissions of config files - Fink currently builds NUT to run as user "nobody", so I have the following non-default permissions: >> >> $ ls -l /sw/etc/nut >> ... >> -rw-r-----+ 1 root nobody 2177 Jun 15 08:42 upsd.users >> -rw-r-----+ 1 root nobody 15455 Jun 15 08:50 upsmon.conf >> >> _______________________________________________ >> Nut-upsuser mailing list >> Nut-upsuser at lists.alioth.debian.org >> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser >-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3583 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170615/fb288fe8/attachment.bin>
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 constantly running and is inherently inefficient. What is the purpose of Boolean: SuccessfulExit?>>> I did have to fiddle with permissions of config files - Fink currently builds NUT to run as user "nobody", so I have the following non-default permissions: >>> >>> $ ls -l /sw/etc/nut >>> ... >>> -rw-r-----+ 1 root nobody 2177 Jun 15 08:42 upsd.users >>> -rw-r-----+ 1 root nobody 15455 Jun 15 08:50 upsmon.conf/sw/etc/nut -rw-r--r-- 1 root admin 12199 Jun 10 16:22 upsmon.conf This are default permissions. I# For best results, you should create a new normal user like "nutmon", # and make it a member of a "nut" group or similar. Then specify it # here and grant read access to the upsmon.conf for that group. # # This user should not have write access to upsmon.conf. # # RUN_AS_USER nutmon RUN_AS_USER root For security reasons you should change root to another user? which other rights are needed for this user to make it work? Kind Regards, Rob> On 15 Jun 2017, at 21:48, Robbie van der Walle <rvanderwalle at gmail.com> wrote: > > 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 > Jun 15 21:38:54 c01 com.apple.xpc.launchd[1] (org.networkupstools.upsmon): This service is defined to be constantly running and is inherently inefficient. > > sudo launchctl list|fgrep -v com.app > > PID Status Label > ? > 1266 0 org.networkupstools.upsmon > > ps -ef |grep upsmon > 0 1266 1 0 9:38PM ?? 0:00.01 /sw/sbin/upsmon -D > 0 1267 1266 0 9:38PM ?? 0:00.02 /sw/sbin/upsmon -D > > Let try to reboot my Mac and check. > > Kind Regards, > > Rob > > > >> On 15 Jun 2017, at 16:51, Robbie van der Walle <rvanderwalle at gmail.com> wrote: >> >> I deleted the plist file and rebooted: >> >> sudo /sw/sbin/upsmon -D >> Network UPS Tools upsmon 2.7.4 >> 0.000000 fopen /sw/var/run/upsmon.pid: No such file or directory >> 0.044649 UPS: ups at ip address (slave) (power value 1) >> 0.081597 Using power down flag file /etc/killpower >> 0.162720 debug level is '1' >> 0.538410 Trying to connect to UPS [ups at ip address] >> 0.540345 Logged into UPS ups at ip address >> >> fopen /sw/var/run/upsmon.pid: No such file or directory >> >> This is strange because the file exits. >> >> Let me check why this is happening. It would explain why the pid is not running. >> >> Kind Regards, >> >> Rob >> >> >> >>> On 15 Jun 2017, at 16:38, Charles Lepple <clepple at gmail.com> wrote: >>> >>> On Jun 15, 2017, at 10:31 AM, Robbie van der Walle <rvanderwalle at gmail.com> 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 permissions of config files - Fink currently builds NUT to run as user "nobody", so I have the following non-default permissions: >>> >>> $ ls -l /sw/etc/nut >>> ... >>> -rw-r-----+ 1 root nobody 2177 Jun 15 08:42 upsd.users >>> -rw-r-----+ 1 root nobody 15455 Jun 15 08:50 upsmon.conf >>> >>> _______________________________________________ >>> Nut-upsuser mailing list >>> Nut-upsuser at lists.alioth.debian.org >>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser >> >-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3583 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170615/9acfe337/attachment.bin>