Apcupsd Frequently Asked Questions

See the bugs section of this document for a list of known bugs and solutions.
What UPS brands does apcupsd support?

Currently apcupsd supports only APC UPSes. However, some companies such as Hewlett Packard put their own brand name on APC manufactured UPSes. Thus even if you do not have an APC branded UPS, it may work with apcupsd. You will need to know the corresponding APC model number. apcupsd supports all the popular APC models. See the installation and configurations sections of this document for more details.

Does apcupsd support Windows?

With release 3.8.0, apcupsd now runs on Win95/98, WinMe, WinNT, and Win2000 machines. All features of the Unix versions of apcupsd are implemented. The UPS EEPROM programming features of apcupsd have not been tested under Windows. Version 3.8.0 does not support simple signaling UPSes (BackUPS, etc). Version 3.8.1 does support most simple signaling UPSes, but not all cables (due to deficiencies in the Windows serial port API). Please note that we have had reports that apcupsd does not work properly on the WinXP system. If you have any information on this, please email us.

I don't have a cable, which one should I build?

First you must know if you have a Smart UPS or a simple signaling UPS -- See the table of supported UPSes in the Configuration Chapter of this manual. If you have a Smart UPS (or a SubSmart), we recommend building a Smart-Custom Cable. If you have a Simple Signaling UPS, we recommend that you build a Simple-Custom Cable.
How much CPU resources does apcupsd use?

Depending on your CPU speed, you may see more or less of the CPU consumed by apcupsd. On a 400MHz Unix system, the CPU usage should fall well below 0.1%. On slower systems, the percentage will increase proportionally to the decrease in the CPU speed. On a 400Mhz Win98 machine, the CPU usage will be on the order of 0.5-1.0%. This is higher than for Unix systems. However, compared to the 30% CPU usage by APC's PowerChute (the version on the CDROM shipped with my UPS), apcupsd's 0.5-1.0% is very modest.

If you configure apcupsd to run with pthreads (--with-pthreads on the ./configure line), apcupsd will run considerably faster, otherwise said, it will consume less of your CPU, and it will use approximately one third of the memory. For example, Carl Erhorn reports that on his Solaris system, "With the old 3-process version, we averaged about 4.8MB of total memory used. With the new single process, we use only about 1.7MB! That's also a very good improvement."

What language is apcupsd written in?

It is written entirely in C.

We are using apcupsd-3.8.1-1 in RedHat 6.2. The slave, when shutting down, is reporting an error at line 436 of apcupsd.c. The error is initiated by apcupsd --killpower ! What can we do to fix this, and is it critical?

No, the error is not serious. Unfortunately, the documentation in the area of master/slaves is not very detailed, and for that reason, your slave setup is not totally correct as explained below.

On master machines, we modify /etc/rc.d/init.d/halt to re-invoke apcupsd with the --killpower option (actually the script apccontrol is called). This causes the UPS to send the codes to the UPS to make it power off.

On slave machines, these modifications should not be made to the /etc/rc.d/init.d/halt script since the slave has no connection to the UPS.

To eliminate the problem, on all your slave machines, either restore the original halt file, or simply delete all the lines containing ***apcupsd***, which were inserted by the apcupsd installation process.

To test apcupsd, I unplugged the UPS to simulate a power outage. After the machine went into the shutdown process I plugged the UPS back into the commercial power source. This caused the shutdown process to hang after the daemon tried to shut-off the ups. Have you run into this problem, and if so do you have a remedy?

Normally, once the shutdown process has begun, we cannot stop it, though there IS some code that tries to do so, we don't consider it a very good idea - how do you stop a shutdown that has killed off half of the daemons running on your system? Most likely you will be left with an unusable system. In addition, when apcupsd is re-executed in the halt script after the disks are synced, it tries to shut off the UPS power, but the UPS will generally refuse to do so if the AC power is on. Since we cannot be 100% sure whether or not the UPS will shut off the power, we don't attempt to reboot the system if we detect that the power is back as it might then get caught by a delayed power off (at least for Smart UPSes).
After running apcupsd for a while, I get the following error:
"Serial communications with UPS lost." What is the problem?

We use standard Unix serial port read() and write() calls so
restartme
Terminates the currently running apcupsd and then restarts it.
runlimit
Does a   printf "UPS battery runtime percent reached. Doing shutdown.\n" | wall    then exits. After completeting this event, apcupsd will immediately initiate a doshutdown event.
timeout
Does a   printf "UPS battery runtime limit exceded. Doing shutdown.\n" | wall    then exits. After completeting this event, apcupsd will immediately initiate a doshutdown event.
startselftest
This is called when apcupsd detects that the UPS is doing a self test. No action is taken.
endselftest
This is called when apcupsd determines that a self test has been completed. No action is taken.

To write your own routine for the powerout action, you create shell script named powerout and put it in the lib directory (normally /etc/apcupsd). When the powerout action is invoked by apcupsd, apccontrol will first give control to your script. If you want apccontrol to continue with the default action, simply exit your script with an exit status of zero. If you do not want apccontrol to continue with the default action, your script should exit with the special exit code of 99. However, in this case, please be aware that you must ensure proper shutdown of your machine if necessary.

Some sample scripts (onbattery and mainsback) that email power failure messages can be found in the examples directory of the source code.



./usr/share/doc/apcupsd/manual/faq.html0100644000000000000000000002233307364101706016752 0ustar rootroot FAQ

Apcupsd Frequently Asked Questions

See the bugs section of this document for a list of known bugs and solutions.
What UPS brands does apcupsd support?

Currently apcupsd supports only APC UPSes. However, some companies such as Hewlett Packard put their own brand name on APC manufactured UPSes. Thus even if you do not have an APC branded UPS, it may work with apcupsd. You will need to know the corresponding APC model number. apcupsd supports all the popular APC models. See the installation and configurations sections of this document for more details.

Does apcupsd support Windows?

With release 3.8.0, apcupsd now runs on Win95/98, WinMe, WinNT, and Win2000 machines. All features of the Unix versions of apcupsd are implemented. The UPS EEPROM programming features of apcupsd have not been tested under Windows. Version 3.8.0 does not support