Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 37e222326095a93978d54b1564dd9954 > files > 82

apcupsd-3.10.5-1mdk.ppc.rpm

<!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 &lt;apcupsd-source-directory&gt;<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>Expected apctest Signals for a Dumb UPS</h2>
If you have configured your UPS as:
<pre>
UPSTYPE backups
UPSCABLE APC_940_0119A
      or APC_940_0127A
      or APC_940_0128A
      or APC_940_0020B
      or APC_940_0020C
</pre>
here are typical signals you would expect to see in the output
from the various tests of apctest:
<pre>
<b>Test 1</b> normal:              RTS for cables (0119A 0127A 0128A)
<b>Test 2</b> no serial cable:     not important
<b>Test 3</b> no AC power:         <b>CTS</b> for all cables
<b>Test 4</b> batteries exhausted: <b>CTS</b> and <b>CD</b> for all cables
</pre>
Note: <b>RTS</b> if set in Test 1 will probably also be set in
all the other tests. This is not important, what counts
is the appearance of <b>CTS</b> when the power fails and additionally
<b>CD</b> when the batteries are low.

<h2>Expected apctest Signals for a BackUPS Pro</h2>
If you have configured your UPS as:
<pre>
UPSTYPE backupspro
UPSCABLE APC_940_0095A
      or APC_940_0095C
</pre>
here are the typical signals you would expect to see in
the output from the various tests of apctest:
<pre>
<b>Test 1</b> normal:              RTS not set
<b>Test 2</b> no serial cable:     not important
<b>Test 3</b> no AC power:         <b>RNG</b> 
<b>Test 4</b> batteries exhausted: <b>RNG</b> and <b>CD</b>
</pre>
Note: <b>RTS</b> should never be set in any of the tests as
it is the killpower signal. What is important
is the appearance of <b>RNG</b> when the power fails and additionally
<b>CD</b> when the batteries are low.

<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 &lt;apcupsd-source-directory&gt;<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 perform 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 should some how become
disconnected during the test.
<p>
<p>Item 5 will terminate <b>apctest</b>.
<hr>

<a href="apcaccess.html" target="_self"><img src="back.gif" border=0 alt="Back"></a>
<a href="apcnisd.html" target="_self"><img src="next.gif" border=0 alt="Next"></a>
<a href="index.html"><img src="home.gif" border=0 alt="Home"></a>
</BODY>
</HTML>