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@localhost established
upsmon[26990]: UPS 5SC2200@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 to understand its purpose.
Can anyone shed some light?

I guess the presumed suspend is triggered 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.

_______________________________________________
Nut-upsdev mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev

Reply via email to