Thanks very much for the help Roger. My ps|grep results almost mirror yours. Only my driver line is different - showing blazer. But I am still seeing: Broadcast Message from nut at loca (somewhere) at 15:25 ... Communications with UPS belkinusb at localhost lost Broadcast Message from nut at loca (somewhere) at 15:25 ... UPS belkinusb at localhost is unavailable This makes me think something remains broken. But upsc belkinusb right after this gets results. Any tips are appreciated. Cheers On 7/8/2019 1:16 PM, Roger Price wrote:> On Mon, 8 Jul 2019, David White wrote: > >> However I am a bit stumped on monitoring. What I want is to execute a >> script when the UPS goes on battery. To do this, I think I have to >> have the nut-client running. Is this correct? If so I seem to have >> some troulbe. > > You need to have nut-monitor.service running. The command > > systemctl list-unit-files | grep nut should report > > nut-driver.service static > nut-monitor.service enabled > nut-server.service enabled > > plus any "delayed UPS shutdown" service you might use. nut-driver is > started automatically by systemd whenever nut-server starts. > > The command ps -elf | grep -E "nut|ups" should show > > 1 S upsd 3096 1 ... /usr/lib/ups/driver/... > 1 S upsd 3100 1 ... /usr/sbin/upsd > 1 S root 3104 1 ... /usr/sbin/upsmon > 5 S upsd 3105 3104 ... /usr/sbin/upsmon > > Roger > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
On Jul 8, 2019, at 6:35 PM, David White wrote:> > This makes me think something remains broken. But > > upsc belkinusb > > right after this gets results.Does "upsc belkinusb at localhost" also work? If not, check to make sure that localhost doesn't resolve to a slightly different address than what upsd is listening to. I don't remember how Ubuntu 14 deals with IPv6, but if I run "getent hosts localhost" on an Ubuntu 18.04 box, it only returns the IPv6 loopback address ("::1", not "127.0.0.1"). If you already have a firewall set up, the easiest answer might be to have upsd listen on 0.0.0.0, and then use firewall rules to restrict untrusted outside hosts.
Hi and thanks Charles. I never would have thought of this. But I do get the same response as without the @localhost. On 7/8/2019 5:15 PM, Charles Lepple wrote:> On Jul 8, 2019, at 6:35 PM, David White wrote: >> >> This makes me think something remains broken. But >> >> upsc belkinusb >> >> right after this gets results. > > Does "upsc belkinusb at localhost" also work? If not, check to make sure > that localhost doesn't resolve to a slightly different address than > what upsd is listening to. I don't remember how Ubuntu 14 deals with > IPv6, but if I run "getent hosts localhost" on an Ubuntu 18.04 box, > it only returns the IPv6 loopback address ("::1", not "127.0.0.1"). > > If you already have a firewall set up, the easiest answer might be to > have upsd listen on 0.0.0.0, and then use firewall rules to restrict > untrusted outside hosts. >