- Q:
-
Why all the craziness with custom serial cables?
- A:
-
It was nothing more nor less than a form of customer control. For a long time
APC wanted to keep other people from talking to its UPSes so it could lock out
potential competition for its PowerChute software. Scrambling the leads on
its serial cables was a cheap way to accomplish this - in fact, they tended
to be wired so that if you tried a straight-through cable, opening a serial
link to the UPS would be interpreted as a shutdown command!
(Hardware companies often think like this - they lock up interfaces by
instinct, cornering a small market rather than growing a bigger one. It's
fundamentally stupid and self-defeating, but it's the kind of stupid that
tends to sound good at an executive meeting.)
Fortunately, APC has lost a lot of this attitude since about 2000; nowadays
they even release technical information to the apcupsd maintainers.
- Q:
-
What UPS brands does apcupsd support?
- A:
-
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.
- Q:
-
Does apcupsd support Windows?
- A:
-
Yes.
- Q:
-
I don't have a cable, which one should I build?
- A:
-
First you must know if you have an apcsmart UPS or a voltage-signalling UPS.
See the table of supported UPSes (see
type_table). If you have a apcsmart UPS,
we recommend building a Custom Smart (see
Smart-Custom Cable for
SmartUPSes) cable. If you
have a voltage-signaling UPS, we recommend that you build a Custom Simple (see
Voltage-Signalling Cable for "dumb"
UPSes)
cable.
- Q:
-
How much CPU resources does apcupsd use?
- A:
-
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.
- Q:
-
What language is apcupsd written in?
- A:
-
It is written entirely in C.
- Q:
-
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?
- A:
-
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.
- Q:
-
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?
- A:
-
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).
- Q:
-
After running apcupsd for a while, I get the following error: ``Serial
communications with UPS lost.'' What is the problem?
- A:
-
We use standard Unix serial port read() and write() calls so once a connection
is made, we generally have few problems. However, there have been reports that
APC's SNMP Management Card can cause serial port problems. If you have such a
card, we suggest that you remove it and see if the problem goes away. It is
also possible that some other process such as a getty is reading the serial
port.
- Q:
-
When apcupsd starts, I get the following error: ``attach_shmarea: cannot get
shm area: Identifier removed.'' What is the problem?
- A:
-
This problem and the problem of cannot create shm area are due to the
fact that the shared memory key that apcupsd wants to use is already in use.
This happens most frequently when there is an old zombie apcupsd process still
in the system. The solution is to remove the old process. You can often see
what is going on by doing a: ipcs command as root when apcupsd is not
running. If you see a segment with the key 0x10feed01, you can be sure there
is some old apcupsd process still using it. If you cannot kill the old
process, you can try using ipcrm (see the man pages). Recent versions
of apcupsd starting with apcupsd-3.8.2Beta6 should no longer have this problem
as they will automatically try using a different key.
- Q:
-
I get the following error: ``Starting apcupsd power management. Mar 20
21:19:40 box apcupsd[297]: apcupsd FATAL ERROR in apcserial.c at line 83.
Cannot open UPS tty /dev/cua01: No such file or directory.'' What is the
problem?
- A:
-
The two most likely causes of your problem are: 1. You have the wrong serial
port device name in the apcupsd.conf file. 2. The device name is not defined
on your system. Suggestions for proceeding:For the first item, check what your
serial port device should be named. You might be able to find the name with
an:
ls /dev
Normally there will be hundreds or even thousands of names that print. If that
doesn't produce anything useful, you can try step 2. Perhaps your device is
not defined. To get more information on your devices try man MAKEDEV or
find / -name MAKEDEV. It is often located in /dev/MAKEDEV.
Looking at the documentation may tell you what the correct name is, or at
least allow you to create the device.
- Q:
-
How do I ensure that the slaves shutdown before the master?
- A:
-
There are several strategies for getting the slaves properly shutdown before
shutting down the master. The first is to make the master wait a period of
time for the slaves to shutdown before doing its own shutdown. Currently, the
master always waits 30 seconds before starting its own shutdown. If this is
insufficient, you can add additional time by putting an appropriate sleep shell command in the /etc/apcupsd/apccontrol file just before the
actual system shutdown command is executed (there are something like 3
places). The second strategy is to put a TIMEOUT value in the apcupsd.conf
file on the slave that is sufficiently short that you are sure that the slave
will shutdown before the master. If the shutdown is done with a poweroff, this
will also save power so that the master can stay up longer.
- Q:
-
How do I ensure that my database server is correctly shutdown?
- A:
-
You simply add whatever commands are necessary in the appropriate case
statements in /etc/apcupsd/apccontrol, which is a standard script file that is
called to actually do the shutdown. Alternatively, you can add your own script
file that will be called before doing the commands in apccontrol. Your script
file must have the same name as the appropriate case statement in apccontrol;
it must be executable; and it must be in the same directory as apccontrol.
- Q:
-
When using USB, I get the following log messages: usb-uhci.c: interrupt,
status 3, frame# 826. What does it mean?
- A:
-
It means one transfer worked (bit 0 in status) and another one (after that)
failed (bit 1) at time frame 826. This kind of soft error is common on USB and
if everything seems to be working, you can ignore it.