Intermittent false detections of power loss (UPS)

Don't miss a thing. Post your questions and discussion about other uncategorized NAS features here.
Post Reply
User avatar
beneix
Know my way around
Posts: 155
Joined: Wed May 26, 2010 5:16 am
Location: France

Intermittent false detections of power loss (UPS)

Post by beneix »

I occasionally (perhaps 2-3 times per month) see warnings in the logs that the QNAP has detected a power loss. Typically, the next message follows between 5 and 60 seconds later, stating that power has been restored.
Image

I know for certain that there have not been any power loss on these occasions. The UPS is an APC Back-UPS 1400.

Do other people also have these false power loss detections?
TS-253B QTS 5.1.5.2679 build 20240219
User avatar
OneCD
Guru
Posts: 12146
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Intermittent false detections of power loss (UPS)

Post by OneCD »

Your UPS might be performing a periodic battery check. Mine happens once a week (at exactly the same time every 7 days).

The UPS simulates a mains power loss by momentarily interrupting the mains input.

If the UPS notification times are too short, you’ll get a notification every time it happens.

I had to extend the time for my APC SmartUPS (via the apcupsd) so that it won’t notify unless the power outage lasts longer than 30 seconds.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
beneix
Know my way around
Posts: 155
Joined: Wed May 26, 2010 5:16 am
Location: France

Re: Intermittent false detections of power loss (UPS)

Post by beneix »

OneCD wrote: Sun Mar 19, 2023 4:28 pm I had to extend the time for my APC SmartUPS (via the apcupsd) so that it won’t notify unless the power outage lasts longer than 30 seconds.
Thanks, that might be it! I've never used apcupsd before; three questions:
1. Can I run the Windows version and plug the APC in to my PC via USB?
2. Would the setting you refer to be done as part of the "Programming the UPS EEPROM" functionality?
3. Is the value to change the "Shutdown Grace Delay"?
TS-253B QTS 5.1.5.2679 build 20240219
User avatar
OneCD
Guru
Posts: 12146
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Intermittent false detections of power loss (UPS)

Post by OneCD »

beneix wrote: Sun Mar 19, 2023 8:02 pm 1. Can I run the Windows version and plug the APC in to my PC via USB?
Sure, but you won't need to. ;)
beneix wrote: Sun Mar 19, 2023 8:02 pm 2. Would the setting you refer to be done as part of the "Programming the UPS EEPROM" functionality?
No, it's a setting used by the daemon on the PC/NAS/etc... that communicates with the UPS.
beneix wrote: Sun Mar 19, 2023 8:02 pm 3. Is the value to change the "Shutdown Grace Delay"?
See below for the setting to change in your apcupsd.conf:

Code: Select all

# ======== Configuration parameters used during power failures ==========
#

# The ONBATTERYDELAY is the time in seconds from when a power failure
#   is detected until we react to it with an onbattery event.
#
#   This means that, apccontrol will be called with the powerout argument
#   immediately when a power failure is detected.  However, the
#   onbattery argument is passed to apccontrol only after the 
#   ONBATTERYDELAY time.  If you don't want to be annoyed by short
#   powerfailures, make sure that apccontrol powerout does nothing
#   i.e. comment out the wall.
ONBATTERYDELAY 30

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
beneix
Know my way around
Posts: 155
Joined: Wed May 26, 2010 5:16 am
Location: France

Re: Intermittent false detections of power loss (UPS)

Post by beneix »

Thanks @OneCD. So I can see that I have /sbin/apcupsd and /etc/apcupsd/apcupsd.conf, but I don't see apcupsd in ps -a | grep apcupsd, so am I supposed to edit the conf file and then do something to start apcupsd alongside the QNAP's own APC management process? Is there a guide for this? I have searched the forum but only found old posts from 2010 discussing an ipkg as a replacement for QNAP's native apcupsd.
TS-253B QTS 5.1.5.2679 build 20240219
User avatar
OneCD
Guru
Posts: 12146
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Intermittent false detections of power loss (UPS)

Post by OneCD »

I think you’re on the right track.

I don’t run QTS on the NAS my UPS is connected-to (switched to Debian a few years ago), but the conf file you’ve found looks like the right one. I imagine after editing it, all that should be needed is to restart the APC daemon.

Maybe someone running QTS can advise you further?

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
OneCD
Guru
Posts: 12146
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Intermittent false detections of power loss (UPS)

Post by OneCD »

When I next power-up one of my QTS NAS, I’ll investigate this and see how it’s done in QTS.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
beneix
Know my way around
Posts: 155
Joined: Wed May 26, 2010 5:16 am
Location: France

Re: Intermittent false detections of power loss (UPS)

Post by beneix »

OneCD wrote: Tue Mar 21, 2023 3:00 pm When I next power-up one of my QTS NAS, I’ll investigate this and see how it’s done in QTS.
Thanks @OneCD. I found your guide for autorun here so I might use that to test out running apcupsd in addition to whatever QNAP's native UPS management is. At the same time, I note that /etc/apcupsd/apcupsd.conf does not contain ONBATTERYDELAY so the version of apcupsd I have may be different to yours. It was last updated in January - probably at a firmware update, I suppose, but it is strange that it gets updated even though apcupsd doesn't seem to be used on the QNAP.
TS-253B QTS 5.1.5.2679 build 20240219
FSC830
Experience counts
Posts: 2043
Joined: Thu Mar 03, 2016 1:11 am

Re: Intermittent false detections of power loss (UPS)

Post by FSC830 »

My QTS NAS (v4.3.4) is connected to an APC UPS, but I do not have any ONBATTERY value in any of the conf files:

Code: Select all

/etc/apcupsd/apcupsd.conf
/etc/default_config/ups_snmptrapd.conf
/etc/default_config/ups/upsd.conf
/etc/default_config/ups/upsmon.conf
/etc/default_config/ups/ups.conf
The UPS self-test is scheduled every 14 days, I always got an e-mail (from UPS) when test is performed, but never from NAS. The selftest lasts only a few seconds.

Regards
Post Reply

Return to “Miscellaneous”