<html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> </head> <body bgcolor="#FFFFFF" text="#000000"> <font size="-1">Hello and thanks in advance for any help/tips. I am new to nut and am trying to get it running with a Belkin FC6550AVR which is a USB device. So I am using the blazer driver. I am on Ubuntu 14 on an ARM system. The UPS is directly connected to a single system and so I have used standalone in the setup.<br> <br> I have have basic configuration correct, I think.<br> <br> And I am running:<br> <br> ?????? service nut-server start<br> <br> on system startup so I can see the upsd running. I can?? issue:<br> <br> ?????? upsc belkinusb<br> <br> and see the expected response in showing variables. And when I unplug the Belkin from the wall I can see a change in ups.status. So I know there is some form of communication happening properly between nut and the Belkin.<br> <br> 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. When I issue:<br> <br> ?????? service nut-client start<br> <br> I see:<br> <br> ?????? * Starting NUT - power device monitor and shutdown controller nut-client[ OK ]<br> <br> ?????? Broadcast Message from nut@loca<br> ?????????????? (somewhere) at 10:57 ...<br> <br> ?????? Communications with UPS belkinusb@localhost lost<br> <br> ?????? Broadcast Message from nut@loca<br> ?????????????? (somewhere) at 10:57 ...<br> <br> ?????? UPS belkinusb@localhost is unavailable<br> <br> Any idea what this means? And if I can managed to do what I want with only the server running, please let me know what I need to do to get my script to run when the UPS goes on battery. When I pull the plug from the wall, my script does not get executed.<br> <br> Cheers!<br> <br> </font> </body> </html>
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
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
Hello all and thanks. I read here <https://mn3m.info/posts/configure-ups-monitor-using-nut-on-debian/> while searching around for my issue's resolution. In this I see that this nut driver is creating and using an entry in /dev (in this case ttyS0). So I "ll tty*" and see nothing with nut. Since this is a USB UPS, I suppose I should be looking for something in /dev/ttyUSB*. I have a single entry there ttyUSB0 but that is created and used by me for running Heyu for my home automation system. Any chance I am onto something here? Thanks 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