[Nut-upsuser] UPS heartbeat on battery
Dan Langille
dan at langille.org
Sat Mar 29 19:09:29 GMT 2025
I'm using nut-2.8.2 on FreeBSD 14.2 with an Eaton 5PX2200RT
Five minutes after starting nut, I get this message within my ssh session:
UPS heartbeat on battery
It is not clear to me why it reports that.
Here is the full output of a restart:
[18:12 gw01 dvl ~] % sudo service nut restart
Stopping nut.
Waiting for PIDS: 2553.
Network UPS Tools - UPS driver controller 2.8.2
fopen /var/db/nut/dummy-ups-heartbeat.pid: No such file or directory
fopen /var/db/nut/usbhid-ups-ups04.pid: No such file or directory
Network UPS Tools - UPS driver controller 2.8.2
Network UPS Tools - Device simulation and repeater driver 0.19 (2.8.2)
Network UPS Tools - Generic HID driver 0.53 (2.8.2)
USB communication driver (libusb 1.0) 0.47
Broadcast Message from root at gw01.int.unixathome.org
(no tty) at 18:12 UTC...
Communications with UPS ups04 lost
Broadcast Message from root at gw01.int.unixathome.org
(no tty) at 18:12 UTC...
Communications with UPS ups04 lost
Broadcast Message from root at gw01.int.unixathome.org
(no tty) at 18:12 UTC...
Communications with UPS heartbeat lost
Broadcast Message from root at gw01.int.unixathome.org
(no tty) at 18:12 UTC...
Communications with UPS heartbeat lost
Using subdriver: MGE HID 1.46
Starting nut.
Network UPS Tools upsd 2.8.2
fopen /var/db/nut/upsd.pid: No such file or directory
Could not find PID file '/var/db/nut/upsd.pid' to see if previous upsd instance is already running!
listening on 127.0.0.1 port 3493
listening on ::1 port 3493
listening on 10.55.0.1 port 3493
listening on 2001:DB8::: port 3493
Connected to UPS [ups04]: usbhid-ups-ups04
Connected to UPS [heartbeat]: dummy-ups-heartbeat
Found 2 UPS defined in ups.conf
Broadcast Message from root at gw01.int.unixathome.org
(no tty) at 18:12 UTC...
Communications with UPS ups04 established
Broadcast Message from root at gw01.int.unixathome.org
(no tty) at 18:13 UTC...
Communications with UPS heartbeat established
Broadcast Message from root at gw01.int.unixathome.org
(no tty) at 18:13 UTC...
UPS heartbeat on line power
Broadcast Message from root at gw01.int.unixathome.org
(no tty) at 18:17 UTC...
UPS heartbeat on battery
[18:25 gw01 dvl ~] %
Is it related by my choices here?
[18:32 gw01 dvl /usr/local/etc/nut] % cat heartbeat.dev
# heartbeat.dev -- 10 minute heartbeat
ups.status: OL
TIMER 300
ups.status: OB
TIMER 300
[18:32 gw01 dvl /usr/local/etc/nut] % cat ups.conf
maxretry = 3
user = nut
[heartbeat]
driver = dummy-ups
port = heartbeat.dev
desc = Watch over NUT
[ups04]
driver = usbhid-ups
port = auto
serial = P0foobar
desc = Primary UPS
Oh wait, I just searched for "nut heartbeat" and found https://alioth-lists.debian.net/pipermail/nut-upsuser/2017-April/010590.html where it mentions: "Remember that the are no comments in NUT .dev files."
Let me delete that first line from my file and restart. Same process.
Ideas please?
more files, slightly modified:
[18:53 gw01 dvl /usr/local/etc/nut] % sudo cat upsmon.conf
# Ansible managed
MONITOR ups04 1 local-monitor secrets master
MONITOR heartbeat 0 upsmaster secrets2 master
SHUTDOWNCMD "/sbin/shutdown -h +0"
POWERDOWNFLAG /etc/killpower
NOTIFYCMD /usr/local/pkg/nut/nut_email.php
NOTIFYCMD /usr/local/sbin/upssched
NOTIFYCMD ONLINE SYSLOG+WALL+EXEC
NOTIFYCMD ONBATT SYSLOG+WALL+EXEC
NOTIFYCMD LOWBATT SYSLOG+WALL+EXEC
NOTIFYCMD FSD SYSLOG+WALL+EXEC
NOTIFYCMD COMMOK SYSLOG+WALL+EXEC
NOTIFYCMD COMMBAD SYSLOG+WALL+EXEC
NOTIFYCMD SHUTDOWN SYSLOG+WALL+EXEC
NOTIFYCMD REPLBATT SYSLOG+WALL+EXEC
NOTIFYCMD NOCOMM SYSLOG+WALL+EXEC
NOTIFYCMD NOPARENT SYSLOG+WALL+EXEC
DEADTIME 15
FINALDELAY 60
HOSTSYNC 15
MINSUPPLIES 1
NOCOMMWARNTIME 300
POLLFREQ 5
POLLFREQALERT 5
RBWARNTIME 43200
RUN_AS_USER nut
[18:54 gw01 dvl /usr/local/etc/nut] % sudo cat upssched.conf
# Ansible managed
# Restart timer which completes only if the dummy-ups heart beat
# has stopped. See timer values in heartbeat.dev
# oh wait, that does not exist
#CMDSCRIPT /usr/local/etc/nut/upssched-cmd
# Let me try this instead
CMDSCRIPT /usr/local/bin/upssched-cmd
PIPEFN /var/db/nut/upssched.pipe
LOCKFN /var/db/nut/upssched.lock
AT ONBATT heartbeat at localhost CANCEL-TIMER heartbeat-failure-timer
AT ONBATT heartbeat at localhost START-TIMER heartbeat-failure-timer 660
--
Dan Langille
dan at langille.org
More information about the Nut-upsuser
mailing list