Recalibrating an APC UPS

This work was done in August. Since then, I have replaced the APC with an Eaton 5PX, and I am much happier.

This might make for interesting reading, but that depends on how bored you are..

Following on from my failed calibration attempts, I thought I would try it again this morning before work.

In this post:

  1. APC UPS SUA2200RM2U with a AP9619 Network Management card
  2. LibreNMS 1.66
  3. FreeBSD 12.1

Before

It’s 1132 UT and knew has just shutdown. That has stopped the battery charge lights on the UPS from flashing. I initiated that shutdown at about 1130 UTC.

I have shutdown acpupsd on all hosts. They are all networked together so that the host directly connected to the UPS will inform the others that it is time to shutdown.

But first

I now think I can run apctest and start a calibration test without the hosts shutting down. I think there is a chance that the pfSense host may shutdown, but I’m OK with that. That is the host from which I am running apctest.

[2.4.5-RELEASE][admin@bast.int.unixathome.org]/root: apctest


2020-08-17 11:46:56 apctest 3.14.14 (31 May 2016) freebsd
Checking configuration ...
sharenet.type = Network & ShareUPS Disabled
cable.type = USB Cable
mode.type = USB UPS Driver
apctest FATAL ERROR in apctest.c at line 313
Unable to create UPS lock file.
  If apcupsd or apctest is already running,
  please stop it and run this program again.
apctest error termination completed

But I stopped apcupsd. I know I did. Through the webui.

[2.4.5-RELEASE][admin@bast.int.unixathome.org]/root: ps auwwx | grep apc
root   99645   0.0  0.2  13136  3860  -  Ss   11:40      0:00.35 /usr/local/sbin/apcupsd
root   73251   0.0  0.1   6560  2292  0  S+   11:47      0:00.00 grep apc
[2.4.5-RELEASE][admin@bast.int.unixathome.org]/root: 

But it is running, and it started about 9 minutes ago. That may be about the time I stopped it.

I killed it:

[2.4.5-RELEASE][admin@bast.int.unixathome.org]/root: date
Mon Aug 17 11:48:24 UTC 2020
[2.4.5-RELEASE][admin@bast.int.unixathome.org]/root: kill -TERM 99645
[2.4.5-RELEASE][admin@bast.int.unixathome.org]/root: ps auwwx | grep apc
root   14896   0.0  0.1   6560  2292  0  S+   11:48      0:00.00 grep apc
[2.4.5-RELEASE][admin@bast.int.unixathome.org]/root: 

Self test

I ran a test self:

[2.4.5-RELEASE][admin@bast.int.unixathome.org]/root: apctest


2020-08-17 11:50:16 apctest 3.14.14 (31 May 2016) freebsd
Checking configuration ...
sharenet.type = Network & ShareUPS Disabled
cable.type = USB Cable
mode.type = USB UPS Driver
Setting up the port ...
Doing prep_device() ...

You are using a USB cable type, so I'm entering USB test mode
Hello, this is the apcupsd Cable Test program.
This part of apctest is for testing USB UPSes.

Getting UPS capabilities...SUCCESS

Please select the function you want to perform.

1)  Test kill UPS power
2)  Perform self-test
3)  Read last self-test result
4)  View/Change battery date
5)  View manufacturing date
6)  View/Change alarm behavior
7)  View/Change sensitivity
8)  View/Change low transfer voltage
9)  View/Change high transfer voltage
10) Perform battery calibration
11) Test alarm
12) View/Change self-test interval
 Q) Quit

Select function number: 2


This test instructs the UPS to perform a self-test
operation and reports the result when the test completes.

Clearing previous self test result...CLEARED
Initiating self test...INITIATED
Waiting for test to complete...TEST DID NOT COMPLETE

However, if I log into the webui for the UPS, I see indications that the self-test did pass.

APC UPS web interface showing UPS: Passed a self-test.
APC UPS web interface showing UPS: Passed a self-test.

I see the time is off: it looks to be non-UTC and off by about an hour.

Calibration time

I have decided to run the calibration test.

1)  Test kill UPS power
2)  Perform self-test
3)  Read last self-test result
4)  View/Change battery date
5)  View manufacturing date
6)  View/Change alarm behavior
7)  View/Change sensitivity
8)  View/Change low transfer voltage
9)  View/Change high transfer voltage
10) Perform battery calibration
11) Test alarm
12) View/Change self-test interval
 Q) Quit

Select function number: 10                  

This test instructs the UPS to perform a battery calibration
operation and reports the result when the process completes.
The battery level must be at 100% and the load must be at least
10% to begin this test.

Battery level is 100% -- OK
Load level is 1220% -- OK
Clearing previous self test result...CLEARED

The battery calibration should automatically end
when the battery level drops below about 25%.
This process can take minutes or hours, depending on
the size of your UPS and the load attached.

Initiating battery calibration...INITIATED

Waiting for calibration to complete...
To abort the calibration, press ENTER.

Battery level: 100%..

The time is now 1157 UTC.

That load level at 1220%? What? I think that’s a bug in the apctest code. There is no way this UPS is overloaded by a factor of 12.

1204 UTC

I just noticed the top light on the battery charge lights go out.

The apctest output now shows:

Battery level: 100%.............................................

I have set the UPS time and changed it to UTC:

ACP UPS setting timezone and date
ACP UPS setting timezone and date

UTC 1206

Wow, down to one flashing light.

Battery level: 100%...........................................................

The webui says 30.5% load and battery capacity is at 20%.

UTC 1210

Battery level: 100%..............................................................................

Oh, that time change

I now wonder if my time change stopped the calibration test.

APC UPS webui says calibration cancelled.
APC UPS webui says calibration cancelled.

I hit ENTER, and stopped the calibration. Now I will wait for the battery to get back up to 100% and run the test again.

Time is 1216 UTC.

At 1311 UTC, battery is at 65% with 9.7% load. All servers are powered off to get back to max battery charge ASAP.

1322 UTC: 72%

1343 UTC: 86%

1402 UTC: 100%

Let’s wait another hour.

I’ve powered on two servers. Load is now 32% and battery capacity is 100%.

The second calibration test

The second calibration test started at 1539 UTC

I received this email from the UPS:

Name     : ups01
Location : Bottom of rack01
Contact  : dan@langille.org
http://ups01.example.org
http://10.2.0.13

Serial # : ZA05053457
Device Ser #: YS04151267
Date: 08/17/2020
Time: 18:05:43
Code: 0x0123

Informational - UPS: Started a runtime calibration.

1806 UTC – control c’d out of apctest

The UPS was not on battery during the test. I suspect the test was not being run, despite what apctest showed.

Instead, I initiated the test from the webui. Immediately the battery started to show decreased capacity, indicating it was on battery, not mains power.

1813 UTC – now at 43% battery capacity. The test goes to 25%.

1816: 21% Calibration done.

I received this email from the UPS:

Name     : ups01
Location : Bottom of rack01
Contact  : dan@langille.org
http://ups01.example.org
http://10.2.0.13

Serial # : ZA05053457
Device Ser #: YS04151267
Date: 08/17/2020
Time: 18:15:36
Code: 0x0124

Informational - UPS: Completed a runtime calibration.

Now waiting for battery to charge to 100%

1840 UTC: 39%

1919 UTC: 66%

2007 UTC: 99%

2041 UTC: 100% starting another calibration, this time with all servers running

2044 UTC: 92%

2047 UTC: 29%

2047 UTC: 16%

WTF? and a 50% load.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top