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.
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?
Intermittent false detections of power loss (UPS)
- beneix
- Know my way around
- Posts: 155
- Joined: Wed May 26, 2010 5:16 am
- Location: France
Intermittent false detections of power loss (UPS)
TS-253B QTS 5.1.5.2679 build 20240219
- OneCD
- Guru
- Posts: 12152
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
Re: Intermittent false detections of power loss (UPS)
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.
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.
- 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)
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
- OneCD
- Guru
- Posts: 12152
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
Re: Intermittent false detections of power loss (UPS)
Sure, but you won't need to.
No, it's a setting used by the daemon on the PC/NAS/etc... that communicates with the UPS.
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
- 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)
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
- OneCD
- Guru
- Posts: 12152
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
Re: Intermittent false detections of power loss (UPS)
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?
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?
- OneCD
- Guru
- Posts: 12152
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
Re: Intermittent false detections of power loss (UPS)
When I next power-up one of my QTS NAS, I’ll investigate this and see how it’s done in QTS.
- 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)
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
-
- Experience counts
- Posts: 2043
- Joined: Thu Mar 03, 2016 1:11 am
Re: Intermittent false detections of power loss (UPS)
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:
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
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
Regards
A raid is never a substitute for backup! Never!
Deadbolt - READ 1st post!!!
Deadbolt - information
Deadbolt - find your OP_RETURN!
VPN=VPN? No!
How to clean up your NAS after malware attack
www.raidisnotabackup.com
Deadbolt - READ 1st post!!!
Deadbolt - information
Deadbolt - find your OP_RETURN!
VPN=VPN? No!
How to clean up your NAS after malware attack
www.raidisnotabackup.com