APC UPS Battery Test

pcm81

Senior member
Mar 11, 2011
581
9
81
I am running Mint and I have 3x APC XS1500 UPS units. I am able to monitor them through APCUPSD but i have not found a way to run a battery life test on them under linux. I even tried installing APC power chute via wine but the install fails... Is there a good way to monitor these UPS units battery life, not just battery charge level, which i can do via apcupsd, without adding a windows machine to my home network? I even tried running a windows 7 virtual machine via Oracle VM VirtualBox, but the USB device for the APC UPS is not listed under the choice of USB devices to pass to the VM, even though I can talk to UPS vis APCUPSD. Also tried installing APC Network shut-down, but since my APC UPS units are connected via USB cable, the networkshutdown can't see them....

Any suggestions?
Thanks ahead
 

edcoolio

Senior member
May 10, 2017
275
75
56
You could try THIS or THIS.

Also, have you attempted to install the APC PowerChute? It may be worth a shot, even if it is not exact for your model... and if they allow the license.

As an aside, running apctest should give you options to do self-tests and battery calibrations (and then the ability to read back the data), but it sounds like you're trying to get something different. Is that correct?

Does running apcaccess give you less than you need?

I'm just trying to get a handle on what you're looking for.
 
Last edited:
  • Like
Reactions: VirtualLarry

XavierMace

Diamond Member
Apr 20, 2013
4,307
450
126
If I'm understanding you, you're trying to get a number for how long until the battery packs need to be replaced? If so, I've never seen an APC UPS that reports that. It just tells you when it's time to replace it.
 

Red Squirrel

No Lifer
May 24, 2003
67,395
12,142
126
www.anyf.ca
You could look at simply monitoring the voltage directly at the batteries. 2.25v per cell is standard float voltage, when power is pulled, it will slowly drop, if it starts to go lower than 2v per cell within a short amount of time the batteries are probably near the end of their life. Ex: a 12v system would float at 13.5v, when power is pulled it will start to drop. 12v is kinda the half way point, at around 11ish it should shut sown (not sure what the threshold is for APC). If you pull the power and it immediately goes below 12v then you probably got a battery that's near end of life. Typically lead acid batteries don't just die, they just start to lose capacity.

You could even use Arduino to do this in real time, and then send a shutdown to all the VMs if the voltage reaches a certain value. Basically you setup SSH key pairs that way you can automate commands to any server. The nice thing with doing it that way is you are not relying on any UPS brand specific tools/software. If you later swap it out for a different brand your system will still work.

Ironicly, I say this but I never bothered setting it up on mine and I have to shut down my stuff manually. I'll do it one day. :p
 
Last edited:

pcm81

Senior member
Mar 11, 2011
581
9
81
You could try THIS or THIS.

Also, have you attempted to install the APC PowerChute? It may be worth a shot, even if it is not exact for your model... and if they allow the license.

As an aside, running apctest should give you options to do self-tests and battery calibrations (and then the ability to read back the data), but it sounds like you're trying to get something different. Is that correct?

Does running apcaccess give you less than you need?

I'm just trying to get a handle on what you're looking for.

Thank you all for replies above. My end goal is to be able to replace the battery in a timely manner. I am in FL and when Irma was passing by and power started to go on and off, i realized my UPS batteries were DED dead. Would like to find a way to anticipate their death or at-least know that they are dead to replace them in a timely manner without having to manually unplug UPS and test the output power. My UPS units are buried under the desk, behind a computer... Think Antec 1200 case with water cooler ontop of it, which i have to get around to get to the UPS units.

Installation of APC powerchute with wine fails. I can't find powerchute for linux. I was able to install network shutdown for linux, but since my UPS units are not network capable, the network shutdown can't see them.

Here is the output of running apctest, it fails...

$ sudo apctest


2017-10-06 18:54:18 apctest 3.14.10 (13 September 2011) debian
Checking configuration ...
Attached to driver: usb
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

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:


Any suggestions?
Thanks ahead
 
  • Like
Reactions: edcoolio

XavierMace

Diamond Member
Apr 20, 2013
4,307
450
126
You could look at simply monitoring the voltage directly at the batteries. 2.25v per cell is standard float voltage, when power is pulled, it will slowly drop, if it starts to go lower than 2v per cell within a short amount of time the batteries are probably near the end of their life. Ex: a 12v system would float at 13.5v, when power is pulled it will start to drop. 12v is kinda the half way point, at around 11ish it should shut sown (not sure what the threshold is for APC). If you pull the power and it immediately goes below 12v then you probably got a battery that's near end of life. Typically lead acid batteries don't just die, they just start to lose capacity.

You could even use Arduino to do this in real time, and then send a shutdown to all the VMs if the voltage reaches a certain value. Basically you setup SSH key pairs that way you can automate commands to any server. The nice thing with doing it that way is you are not relying on any UPS brand specific tools/software. If you later swap it out for a different brand your system will still work.

Ironicly, I say this but I never bothered setting it up on mine and I have to shut down my stuff manually. I'll do it one day. :p

The problem is, as you just explained is that when there's no load on the batteries, it's going to read fine. If you wait until you're on battery to find out they are toast, it's too late. IE: On fresh batteries, at full load my setup should give me about 3 hours usage. How much is it currently giving me at full load? 15 minutes.

That's why you're supposed to run the self tests and calibration as that's exactly what that's doing.
 
  • Like
Reactions: edcoolio

pcm81

Senior member
Mar 11, 2011
581
9
81
I should add that apctest fails for 2/2 APC UPS units i tried. Both are XS1500 models.
 

edcoolio

Senior member
May 10, 2017
275
75
56
I should add that apctest fails for 2/2 APC UPS units i tried. Both are XS1500 models.

It is my understanding is that a fail means that the internal battery must be replaced.

The easiest test to verify the data you're are getting, without accessing the the APC itself : Unplug it from the wall, time how long you have real world runtime, and calculate the load of your components. Frankly, the math is about is accurate as you will ever get for real world application.
 

pcm81

Senior member
Mar 11, 2011
581
9
81
The two APCs i am using for this test have brand new batteries and have estimated runtime of 8 and 41 minutes per APC's front panel..
 

Red Squirrel

No Lifer
May 24, 2003
67,395
12,142
126
www.anyf.ca
Yeah I find it's best to do a real world test, I never go by what the front panel or the box says. I always lol when a tiny UPS with a 7.2ah battery says it will run for 40 minutes at full load. I don't tend to expect more than 5 minutes out of an off the shelf UPS with stock battery.
 

pcm81

Senior member
Mar 11, 2011
581
9
81
Yeah I find it's best to do a real world test, I never go by what the front panel or the box says. I always lol when a tiny UPS with a 7.2ah battery says it will run for 40 minutes at full load. I don't tend to expect more than 5 minutes out of an off the shelf UPS with stock battery.

The UPS with 41 minute estimated run time is only supplying 141W and has 2x 9AH 12V batteries... so we get 216WH of energy from batteries... But of course there is inverter inefficiencies etc.
 

XavierMace

Diamond Member
Apr 20, 2013
4,307
450
126
OK, so we've moved from questions about what data can be pulled to questioning their current state? Assuming your UPS's are the same as the enterprise rackmount ones I'm used to, run a test and calibration from the front panel and see what the results are.