What criteria is used to trigger battery needs replacement flag?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

What criteria is used to trigger battery needs replacement flag?

David C. Rankin
Adam, all,

  I have a trusty old BP650s backup that is throwing the battery needs replacing
message, e.g.:

  Mon Aug 22 08:20:58 CDT 2016  UPS battery must be replaced.

  I've already ordered another replacement and it is on its way. The current
battery is just about exactly 2 years old. The reason I ask is I can't find
anything out of spec (this is an old version of apcupsd running my office fax
server -- it's been running for 14 years, so I dare not tempt fate...):

$ apcaccess
APC      : 001,049,1171
DATE     : Mon Aug 22 15:27:33 CDT 2016
HOSTNAME : nemesis
RELEASE  : 3.14.5
VERSION  : 3.14.5 (10 January 2009) suse
UPSNAME  : NEMESIS
CABLE    : APC Cable 940-0095A
MODEL    : Back-UPS Pro 650
UPSMODE  : Stand Alone
STARTTIME: Mon Aug 22 14:41:11 CDT 2016
STATUS   : ONLINE
LINEV    : 123.8 Volts
LOADPCT  :   0.0 Percent Load Capacity
BCHARGE  : 100.0 Percent
TIMELEFT : 114.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
MAXLINEV : 124.5 Volts
MINLINEV : 123.1 Volts
OUTPUTV  : 123.8 Volts
SENSE    : High
DWAKE    : 060 Seconds
DSHUTD   : 020 Seconds
DLOWBATT : 02 Minutes
LOTRANS  : 106.0 Volts
HITRANS  : 127.0 Volts
RETPCT   : 000.0 Percent
ALARMDEL : 5 seconds
BATTV    : 13.8 Volts
LINEFREQ : 60.0 Hz
LASTXFER : No transfers since turnon
NUMXFERS : 0
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI   : 336
STATFLAG : 0x07000008 Status Flag
REG1     : 0x00 Register 1
REG2     : 0x00 Register 2
REG3     : 0x00 Register 3
MANDATE  : 02/09/01
SERIALNO : NB0106162781
BATTDATE : 08/01/14
NOMOUTV  : 115 Volts
NOMBATTV :  12.0 Volts
FIRMWARE : 12.6.D
APCMODEL : CWD
END APC  : Mon Aug 22 15:28:02 CDT 2016

  I've looked at the EEPROM values from apctest/program EEPROM and I can't find
anything out of place. Does anybody know what the message is keyed off of?

--
David C. Rankin, J.D.,P.E.

------------------------------------------------------------------------------
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What criteria is used to trigger battery needs replacement flag?

William P.N. Smith
I was going to say it's when it fails a self-test, but you seem to have that turned off.

Did you have a power failure recently?  Maybe it detected a soft battery when it had to use it.

William P.N. Smith
ComputerSmiths Consulting, Inc.

> On Aug 22, 2016, at 4:32 PM, David C. Rankin <[hidden email]> wrote:
>
> Adam, all,
>
>  I have a trusty old BP650s backup that is throwing the battery needs replacing
> message, e.g.:
>
>  Mon Aug 22 08:20:58 CDT 2016  UPS battery must be replaced.
>
>  I've already ordered another replacement and it is on its way. The current
> battery is just about exactly 2 years old. The reason I ask is I can't find
> anything out of spec (this is an old version of apcupsd running my office fax
> server -- it's been running for 14 years, so I dare not tempt fate...):
>
> $ apcaccess
> APC      : 001,049,1171
> DATE     : Mon Aug 22 15:27:33 CDT 2016
> HOSTNAME : nemesis
> RELEASE  : 3.14.5
> VERSION  : 3.14.5 (10 January 2009) suse
> UPSNAME  : NEMESIS
> CABLE    : APC Cable 940-0095A
> MODEL    : Back-UPS Pro 650
> UPSMODE  : Stand Alone
> STARTTIME: Mon Aug 22 14:41:11 CDT 2016
> STATUS   : ONLINE
> LINEV    : 123.8 Volts
> LOADPCT  :   0.0 Percent Load Capacity
> BCHARGE  : 100.0 Percent
> TIMELEFT : 114.0 Minutes
> MBATTCHG : 5 Percent
> MINTIMEL : 3 Minutes
> MAXTIME  : 0 Seconds
> MAXLINEV : 124.5 Volts
> MINLINEV : 123.1 Volts
> OUTPUTV  : 123.8 Volts
> SENSE    : High
> DWAKE    : 060 Seconds
> DSHUTD   : 020 Seconds
> DLOWBATT : 02 Minutes
> LOTRANS  : 106.0 Volts
> HITRANS  : 127.0 Volts
> RETPCT   : 000.0 Percent
> ALARMDEL : 5 seconds
> BATTV    : 13.8 Volts
> LINEFREQ : 60.0 Hz
> LASTXFER : No transfers since turnon
> NUMXFERS : 0
> TONBATT  : 0 seconds
> CUMONBATT: 0 seconds
> XOFFBATT : N/A
> SELFTEST : NO
> STESTI   : 336
> STATFLAG : 0x07000008 Status Flag
> REG1     : 0x00 Register 1
> REG2     : 0x00 Register 2
> REG3     : 0x00 Register 3
> MANDATE  : 02/09/01
> SERIALNO : NB0106162781
> BATTDATE : 08/01/14
> NOMOUTV  : 115 Volts
> NOMBATTV :  12.0 Volts
> FIRMWARE : 12.6.D
> APCMODEL : CWD
> END APC  : Mon Aug 22 15:28:02 CDT 2016
>
>  I've looked at the EEPROM values from apctest/program EEPROM and I can't find
> anything out of place. Does anybody know what the message is keyed off of?
>
> --
> David C. Rankin, J.D.,P.E.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Apcupsd-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/apcupsd-users

------------------------------------------------------------------------------
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What criteria is used to trigger battery needs replacement flag?

Adam Płaszczyca
In reply to this post by David C. Rankin

I have similar issue with an old (1994!) SmartUPS one. There is no eeprom values present, however program commands are working by using direct console access allowing to change some values e.g. battery charge parameters.

Regards, Adam.


22 sie 2016 11:08 PM "David C. Rankin" <[hidden email]> napisał(a):
Adam, all,

  I have a trusty old BP650s backup that is throwing the battery needs replacing
message, e.g.:

  Mon Aug 22 08:20:58 CDT 2016  UPS battery must be replaced.

  I've already ordered another replacement and it is on its way. The current
battery is just about exactly 2 years old. The reason I ask is I can't find
anything out of spec (this is an old version of apcupsd running my office fax
server -- it's been running for 14 years, so I dare not tempt fate...):

$ apcaccess
APC      : 001,049,1171
DATE     : Mon Aug 22 15:27:33 CDT 2016
HOSTNAME : nemesis
RELEASE  : 3.14.5
VERSION  : 3.14.5 (10 January 2009) suse
UPSNAME  : NEMESIS
CABLE    : APC Cable 940-0095A
MODEL    : Back-UPS Pro 650
UPSMODE  : Stand Alone
STARTTIME: Mon Aug 22 14:41:11 CDT 2016
STATUS   : ONLINE
LINEV    : 123.8 Volts
LOADPCT  :   0.0 Percent Load Capacity
BCHARGE  : 100.0 Percent
TIMELEFT : 114.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
MAXLINEV : 124.5 Volts
MINLINEV : 123.1 Volts
OUTPUTV  : 123.8 Volts
SENSE    : High
DWAKE    : 060 Seconds
DSHUTD   : 020 Seconds
DLOWBATT : 02 Minutes
LOTRANS  : 106.0 Volts
HITRANS  : 127.0 Volts
RETPCT   : 000.0 Percent
ALARMDEL : 5 seconds
BATTV    : 13.8 Volts
LINEFREQ : 60.0 Hz
LASTXFER : No transfers since turnon
NUMXFERS : 0
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI   : 336
STATFLAG : 0x07000008 Status Flag
REG1     : 0x00 Register 1
REG2     : 0x00 Register 2
REG3     : 0x00 Register 3
MANDATE  : 02/09/01
SERIALNO : NB0106162781
BATTDATE : 08/01/14
NOMOUTV  : 115 Volts
NOMBATTV :  12.0 Volts
FIRMWARE : 12.6.D
APCMODEL : CWD
END APC  : Mon Aug 22 15:28:02 CDT 2016

  I've looked at the EEPROM values from apctest/program EEPROM and I can't find
anything out of place. Does anybody know what the message is keyed off of?

--
David C. Rankin, J.D.,P.E.

------------------------------------------------------------------------------
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users

------------------------------------------------------------------------------

_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What criteria is used to trigger battery needs replacement flag?

Trevor Roydhouse
In reply to this post by David C. Rankin
David C. Rankin wrote on 08/23/16 06:32:
>    I've looked at the EEPROM values from apctest/program EEPROM and I can't find
> anything out of place. Does anybody know what the message is keyed off of?

The UPS sends a hash character to indicate it thinks the battery should
be replaced.

     * If something changes on the UPS, a special character is
     * sent over the serial line but no \n\r sequence is sent:
     * only a single character. This way if s == NULL, if we
     * receive a character like this we must return immediately
     * and not wait for a string completion.


       case UPS_REPLACE_BATTERY:   /* UPS_REPLACE_BATTERY = '#'   */
          if (s == NULL)
             write_lock(_ups);
          _ups->set_replacebatt();
          Dmsg(80, "Got UPS REPLACE_BATT.\n");
          if (s == NULL) {
             write_unlock(_ups);
             ending = 1;
          }
          break;


------------------------------------------------------------------------------
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What criteria is used to trigger battery needs replacement flag?

David C. Rankin
On 08/23/2016 01:41 AM, Trevor Roydhouse wrote:

> David C. Rankin wrote on 08/23/16 06:32:
>> >    I've looked at the EEPROM values from apctest/program EEPROM and I can't find
>> > anything out of place. Does anybody know what the message is keyed off of?
> The UPS sends a hash character to indicate it thinks the battery should
> be replaced.
>
>      * If something changes on the UPS, a special character is
>      * sent over the serial line but no \n\r sequence is sent:
>      * only a single character. This way if s == NULL, if we
>      * receive a character like this we must return immediately
>      * and not wait for a string completion.
>
>
>        case UPS_REPLACE_BATTERY:   /* UPS_REPLACE_BATTERY = '#'   */
>           if (s == NULL)
>              write_lock(_ups);
>           _ups->set_replacebatt();
>           Dmsg(80, "Got UPS REPLACE_BATT.\n");
>           if (s == NULL) {
>              write_unlock(_ups);
>              ending = 1;
>           }
>           break;
>

Ok, so as part of a switch statement, there is a global constant (or macro
#define) UPS_REPLACE_BATTERY that is `#` (ASCII 35 or 0x23 hex) that checks 's'
and puts the UPS in 'write_lock' then sets then calls either a member function
set_replacebatt(). Now I'm a little unclear what Dmsg(80, "Got UPS
REPLACE_BATT.\n"); does although it looks like a write to the cgi status page,
then unlocks the write lock and sets ending to true.

Hmm... clear as mud..., the _ups->set_replacebatt(); is still a bit mysterious.

Yes, this UPS takes short power hits daily (we are in Nacogdoches, Texas -- not
exactly known for stable power). I guess I'll try digesting the source a bit
more, to try and nail it down. I'll report back if I get it tracked down to what
generates the '#' to trigger the UPS_REPLACE_BATTERY case.

Thanks for the help. If anything else comes to mind, just let me know.

--
David C. Rankin, J.D.,P.E.

------------------------------------------------------------------------------
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What criteria is used to trigger battery needs replacement flag?

Trevor Roydhouse
David C. Rankin wrote on 08/25/16 11:11:

> Ok, so as part of a switch statement, there is a global constant (or macro
> #define) UPS_REPLACE_BATTERY that is `#` (ASCII 35 or 0x23 hex) that checks 's'
> and puts the UPS in 'write_lock' then sets then calls either a member function
> set_replacebatt(). Now I'm a little unclear what Dmsg(80, "Got UPS
> REPLACE_BATT.\n"); does although it looks like a write to the cgi status page,
> then unlocks the write lock and sets ending to true.

I'm assuming Dmesg is a debug message if debugging is turned on.

> Yes, this UPS takes short power hits daily (we are in Nacogdoches, Texas -- not
> exactly known for stable power). I guess I'll try digesting the source a bit
> more, to try and nail it down. I'll report back if I get it tracked down to what
> generates the '#' to trigger the UPS_REPLACE_BATTERY case.

The hash character is sent by the UPS itself when it decides that the
battery needs replacing (as per the comment above the switch() statement.

------------------------------------------------------------------------------
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What criteria is used to trigger battery needs replacement flag?

David C. Rankin
In reply to this post by William P.N. Smith
On 08/22/2016 06:27 PM, William Smith wrote:

> I was going to say it's when it fails a self-test, but you seem to have that
> turned off.
>
> Did you have a power failure recently?  Maybe it detected a soft battery when
> it had to use it.
>
> William P.N. Smith
> ComputerSmiths Consulting, Inc.
>
>>>

OK,

  I think you are right. I've gone back and drilled through the logs and it
looks like a soft battery after a power fail could be the issue. The relevant
logs look like this:

Summary:

Jul 20 15:09:13 nemesis apcupsd[2672]: UPS Self Test switch to battery.
Jul 20 15:09:18 nemesis apcupsd[2672]: UPS Self Test completed: Battery OK

(multiple power failures, short, then first replace message)

Aug 17 15:09:05 nemesis apcupsd[2666]: UPS battery must be replaced.

(2 significant power failures 8/21)

Aug 21 03:14:43 nemesis apcupsd[2666]: apcupsd shutdown succeeded
Aug 21 21:48:11 nemesis apcupsd[2669]: NIS server startup succeeded
Aug 21 21:48:11 nemesis apcupsd[2669]: apcupsd 3.14.5 (10 January 2009) suse
startup succeeded

Aug 21 23:05:14 nemesis apcupsd[2669]: apcupsd shutdown succeeded
Aug 21 23:10:32 nemesis apcupsd[4774]: NIS server startup succeeded
Aug 21 23:10:32 nemesis apcupsd[4774]: apcupsd 3.14.5 (10 January 2009) suse
startup succeeded

UPS replace battery messages continue through 8/22, then there have been none
since this last message:

Aug 22 08:20:58 nemesis apcupsd[4774]: UPS battery must be replaced.

  The full logs are below. I'm chalking this up to a soft battery (I'm still
replacing the current one, but it looks like the cumulative effect of the poor
power we have in Eastern Texas).

Full logs since last successful Self Test:

Jul 20 15:09:13 nemesis apcupsd[2672]: UPS Self Test switch to battery.
Jul 20 15:09:18 nemesis apcupsd[2672]: UPS Self Test completed: Battery OK
Jul 24 17:26:47 nemesis apcupsd[2672]: Power failure.
Jul 24 17:26:48 nemesis apcupsd[2672]: Power is back. UPS running on mains.
Aug  5 12:38:41 nemesis apcupsd[2672]: Power failure.
Aug  5 12:38:42 nemesis apcupsd[2672]: Power is back. UPS running on mains.
Aug  8 16:20:02 nemesis apcupsd[2672]: Power failure.
Aug  8 16:20:03 nemesis apcupsd[2672]: Power is back. UPS running on mains.
Aug  9 17:42:12 nemesis apcupsd[2672]: Power failure.
Aug  9 17:42:14 nemesis apcupsd[2672]: Power is back. UPS running on mains.
Aug 14 10:34:54 nemesis apcupsd[2672]: Power failure.
Aug 14 10:34:56 nemesis apcupsd[2672]: Power is back. UPS running on mains.
Aug 16 08:00:36 nemesis apcupsd[2695]: NIS server startup succeeded
Aug 16 08:00:36 nemesis apcupsd[2695]: apcupsd 3.14.5 (10 January 2009) suse
startup succeeded
Aug 16 08:15:48 nemesis apcupsd[2695]: Power failure.
Aug 16 08:15:52 nemesis apcupsd[2695]: Power is back. UPS running on mains.
Aug 16 08:17:31 nemesis apcupsd[2666]: NIS server startup succeeded
Aug 16 08:17:31 nemesis apcupsd[2666]: apcupsd 3.14.5 (10 January 2009) suse
startup succeeded
Aug 16 08:40:47 nemesis apcupsd[2666]: Power failure.
Aug 16 08:40:49 nemesis apcupsd[2666]: Power is back. UPS running on mains.
Aug 17 15:09:05 nemesis apcupsd[2666]: UPS battery must be replaced.
Aug 18 00:09:19 nemesis apcupsd[2666]: UPS battery must be replaced.
Aug 18 09:09:28 nemesis apcupsd[2666]: UPS battery must be replaced.
Aug 18 18:09:38 nemesis apcupsd[2666]: UPS battery must be replaced.
Aug 19 03:09:48 nemesis apcupsd[2666]: UPS battery must be replaced.
Aug 19 08:17:02 nemesis apcupsd[2666]: Power failure.
Aug 19 08:17:04 nemesis apcupsd[2666]: Power is back. UPS running on mains.
Aug 19 12:10:47 nemesis apcupsd[2666]: UPS battery must be replaced.
Aug 19 21:10:56 nemesis apcupsd[2666]: UPS battery must be replaced.
Aug 20 06:11:06 nemesis apcupsd[2666]: UPS battery must be replaced.
Aug 20 15:11:16 nemesis apcupsd[2666]: UPS battery must be replaced.
Aug 21 00:11:26 nemesis apcupsd[2666]: UPS battery must be replaced.
Aug 21 02:02:15 nemesis apcupsd[2666]: Power failure.
Aug 21 02:02:17 nemesis apcupsd[2666]: Power is back. UPS running on mains.
Aug 21 02:02:24 nemesis apcupsd[2666]: Power failure.
Aug 21 02:02:28 nemesis apcupsd[2666]: Power is back. UPS running on mains.
Aug 21 03:14:33 nemesis apcupsd[2666]: Power failure.
Aug 21 03:14:34 nemesis apcupsd[2666]: Battery charge below low limit.
Aug 21 03:14:34 nemesis apcupsd[2666]: Initiating system shutdown!
Aug 21 03:14:34 nemesis apcupsd[2666]: User logins prohibited
Aug 21 03:14:37 nemesis apcupsd[2666]: Power is back. UPS running on mains.
Aug 21 03:14:37 nemesis apcupsd[2666]: Allowing logins
Aug 21 03:14:43 nemesis apcupsd[2666]: apcupsd exiting, signal 15
Aug 21 03:14:43 nemesis apcupsd[2666]: apcupsd shutdown succeeded
Aug 21 21:48:11 nemesis apcupsd[2669]: NIS server startup succeeded
Aug 21 21:48:11 nemesis apcupsd[2669]: apcupsd 3.14.5 (10 January 2009) suse
startup succeeded
Aug 21 21:58:29 nemesis apcupsd[2669]: UPS battery must be replaced.
Aug 21 23:05:14 nemesis apcupsd[2669]: apcupsd exiting, signal 15
Aug 21 23:05:14 nemesis apcupsd[2669]: apcupsd shutdown succeeded
Aug 21 23:10:32 nemesis apcupsd[4774]: NIS server startup succeeded
Aug 21 23:10:32 nemesis apcupsd[4774]: apcupsd 3.14.5 (10 January 2009) suse
startup succeeded
Aug 21 23:20:50 nemesis apcupsd[4774]: UPS battery must be replaced.
Aug 22 08:20:58 nemesis apcupsd[4774]: UPS battery must be replaced.
Aug 22 14:41:24 nemesis apcupsd[2670]: NIS server startup succeeded
Aug 22 14:41:24 nemesis apcupsd[2670]: apcupsd 3.14.5 (10 January 2009) suse
startup succeeded
Aug 22 21:03:32 nemesis apcupsd[2670]: Power failure.
Aug 22 21:03:36 nemesis apcupsd[2670]: Power is back. UPS running on mains.



--
David C. Rankin, J.D.,P.E.

------------------------------------------------------------------------------
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Loading...