<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <TITLE>apctest</TITLE> <META NAME="CHANGEDBY" CONTENT="Kern Sibbald"> <link rel=stylesheet href="apcupsd-styles.css" type="text/css"> </HEAD> <BODY> <H1>apctest</H1> <b>apctest</b> is a program that allows you to directly talk to your UPS and run certain tests. It will function either for Simple Signaling UPSes (dumb UPSes) or for Smart UPSes. <h2>Running apctest for a Simple Signaling UPS</h2> <p> Shutdown apcupsd if it is running.<br> Make sure your <b>/etc/apcupsd/apcupsd.conf</b> file has <b>UPSTYPE backups</b> and <b>UPSCABLE simple</b><br> Normally <b>apctest</b> will have been built and installed by default, otherwise, you can explicitly build it on Unix with: <br> <p> cd <apcupsd-source-directory><br> make apctest<br> ./apctest<br> <br> on Win32 systems, use:<br> make apctestwin32<br> ./apctest<br> </p> It will present you with the following output <pre> 2001-02-07 04:08:26 apctest 3.8.5 (3 January 2002) redhat Checking configuration ... sharenet.type = DISABLE cable.type = CUSTOM_SIMPLE mode.type = BK Setting up serial port ... Creating serial port lock file ... Doing prep_serial() ... Hello, this is the apcupsd Cable Test program. This part of apctest is for testing dumb UPSes (ones that uses signaling rather than commands. Most tests enter a loop polling every second for 10 seconds. </pre> Then it will present you with the following list of choices: <pre> 1) Test 1 - normal mode 2) Test 2 - no cable 3) Test 3 - no power 4) Test 4 - low battery (requires test 3 first) 5) Test 5 - battery exhausted 6) Test 6 - kill UPS power 7) Test 7 - run tests 1 through 5 8) Guess which is the appropriate cable 9) quit Select test number: </pre> Run tests 1, 2, and 3. Note, none of the currently supported cables will indicate a change for test 2. You can then run test 8 to see what cable it thinks you should be using. Finally run test 4. <p>apctest can also be run for Smart UPSes.</p>The print out of your testing will be written to the file <b>apctest.output</b>. If you are unable to solve your problem, you can try posting that file to the development mailing list, and perhaps we can help you. In this case, please also include information on your operating system, which version of <b>apcupsd</b> you are using, your UPS model, and also your <b>apcupsd.conf</b> file. <h2>Running apctest for a Smart UPS</h2> <p> Shutdown apcupsd if it is running.<br> Make sure your <b>/etc/apcupsd/apcupsd.conf</b> file has <b>UPSTYPE backups</b> and <b>UPSCABLE simple</b><br> Normally <b>apctest</b> will have been built and installed by default, otherwise, you can explicitly build it on Unix with: <br> <p> cd <apcupsd-source-directory><br> make apctest<br> ./apctest<br> <br> on Win32 systems, use:<br> make apctestwin32<br> ./apctest<br> </p> It will present you with the following output <pre> 2002-01-03 21:04:57 apctest 3.8.5 (3 January 2002) redhat Checking configuration ... sharenet.type = DISABLE cable.type = CUSTOM_SMART You are using a SMART cable type, so I'm entering SMART test mode mode.type = SMART Setting up serial port ... Creating serial port lock file ... Hello, this is the apcupsd Cable Test program. This part of apctest is for testing Smart UPSes. Please select the function you want to perform. 1) Query the UPS for all known values 2) Perform a Battery Runtime Calibration 3) Abort Battery Calibration 4) Monitor Battery Calibration progress 5) Quit Select function number: </pre> <p>Item 1 will probe the UPS for all values known to <b>apcupsd</b> and present them in rather raw format. This output can be useful for providing technical support if you are having problems with your UPS. <p> <p>Item 2 will perform a Battery Runtime Calibration. This test will only be performed if your battery is 100% charged. Running the test will cause the batteries to be discharged to approximately 30% of capacity. The exact number depends on the UPS model. In any case, <b>apctest</b> will abort the test if it detects that the battery charge is 20% or less. <p>The advantage of doing this test is that the UPS will be able to recalibrate the remaining runtime counter that it maintains in its firmware. As your batteries age, they tend to hold less of a charge, so the runtime calibration may not be accurate after several years. <p>We recommend that perform a Battery Calibration about once a year. You should not peform this calibration too often since discharging the batteries tends to shorten their lifespan. <p> <p>Item 3 can be used to abort a Battery Calibration in progress, if you some how became disconnected. <p> <p>Item 4 can be used to restart the monitoring of a Battery Calibration if you shome how become disconnected during the test. <p> <p>Item 5 will terminate <b>apctest</b>. </BODY> </HTML>