[Nut-upsuser] NUT spamming with suspend/resume messages
Andrea Venturoli
ml at netfence.it
Mon Apr 20 18:03:55 BST 2026
Hello.
Since I upgraded to 2.8.4 nut has started printing the following message
every now and then.
> OS just finished sleep/suspend/hibernate mode, de-activating obsolete UPS readi
> ngs to avoid an unfortunate shutdown
This comes up in the logs and on every console and is quite annoying,
especially considering this machine is a server which never goes to
sleep, suspension or hibernation.
I put the following in upsmon.conf:
> NOTIFYFLAG SUSPEND_STARTING SYSLOG
> NOTIFYFLAG SUSPEND_FINISHED SYSLOG
However this is not enough, as these messages are followed by others
> upsmon[26990]: Communications with UPS 5SC2200 at localhost established
> upsmon[26990]: UPS 5SC2200 at localhost on line power
which I don't want to silence.
I had a look at the sources...
Given I'm on FreeBSD, where systemd is not a thing, AFAICT it boils down
to the following code in upsmon.c:
> /* General-purpose handling of time jumps for OSes/run-times * without NUT direct support for suspend/inhibit */
> dt = difftimeval(end, start);
> if (dt > (sleepval + sleep_overhead_tolerance)) {
> upsdebugx(2, "It seems we have slept without warning or the system clock was changed");
> if (sleep_inhibitor_status < 0)
> sleep_inhibitor_status = 0; /* behave as woken up */
> } else if (dt < 0) {
> upsdebugx(2, "It seems the system clock was changed into the past");
> if (sleep_inhibitor_status < 0)
> sleep_inhibitor_status = 0; /* behave as woken up */
> }
I'm tempted to remove it all, but I fail however to understand its purpose.
Can anyone shed some light?
I guess the presumed suspend is triggerd when the server is under high
load and it sleeps longer than requested, but why would this require
resetting the "readings", especially when on line power?
Any other hint is welcome.
bye & Thanks
av.
More information about the Nut-upsuser
mailing list