[Nut-upsuser] Data Stale issue

Charles Lepple clepple at gmail.com
Tue May 7 03:27:35 BST 2019

On May 6, 2019, at 2:57 PM, Stuart D. Gathman wrote:
> On Mon, 6 May 2019, Gareth Davies wrote:
>> Just to say, I stopped the driver and started it again and the errors went
>> away! However, I turned off power to the UPS but I wasn’t receiving any
>> e-mails :( also when I rebooted the RPi the driver/service didn’t start back
>> up automatically... 
>> I wonder if you have any thoughts on the above?
> Those are issues with understanding your distro.  For the latter, if you are using systemd, and your systemd service is called
> nut-server.service (as it is in Fedora), you would enable it at boot
> with "systemctl enable nut-server".  Systemd automatically starts
> prerequistites first, so on Fedora at least, starting nut-server first
> starts nut-driver.  You probably also need to start nut-monitor, as
> that is the usual place you would configure sending notifications.
> Sorry, I don't have details on Debian.

Stuart, thanks for jumping in. The systemd services are named the same in Debian.

Gareth, you should get something like the following:

$ systemctl|grep nut-
  nut-driver.service      loaded active running   Network UPS Tools - power device driver controller                                                   
● nut-monitor.service     loaded failed failed    Network UPS Tools - power device monitor and shutdown controller                                     
  nut-server.service      loaded active running   Network UPS Tools - power devices information server                                                 

In your case, you will want nut-monitor to be running as well - it starts upsmon. (This was taken from a partially-configured system.)

Debian 9 (stretch) is what we are looking for when referring to the distro. Armed with that information, we can look up the latest NUT version for that distro at packages.debian.org/nut-server <http://packages.debian.org/nut-server>, but it's always good to verify that your own system is up-to-date:

$ dpkg -l "nut-*"
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                      Version           Architecture      Description
un  nut-cgi                   <none>            <none>            (no description available)
ii  nut-client                2.7.4-5           amd64             network UPS tools - clients
un  nut-ipmi                  <none>            <none>            (no description available)
un  nut-monitor               <none>            <none>            (no description available)
ii  nut-server                2.7.4-5           amd64             network UPS tools - core system
un  nut-snmp                  <none>            <none>            (no description available)
un  nut-xml                   <none>            <none>            (no description available)

Not sure if you saw Roger's message (he sent it directly to the list, and it doesn't look like you are subscribed): https://alioth-lists.debian.net/pipermail/nut-upsuser/2019-May/011373.html <https://alioth-lists.debian.net/pipermail/nut-upsuser/2019-May/011373.html> His guide covers a lot of the setup process, including a script to email about power status changes. Personally, once the services start at boot, I would be satisfied with just notifying on COMMBAD and NOCOMM events (between the two, that should cover USB-related errors), but in the end it's up to you to trade off between complexity of the initial setup, and reliability in the long term.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20190506/562c99f5/attachment-0001.html>

More information about the Nut-upsuser mailing list