Logging the STATUS Information
If specified in the configuration file, the STATUS data will also be written to
the system log file. Please note, that it would not normally be wise to write
this data to a normal system log file as there is no mechanism in syslog()
to rewind the file and hence the log file would quickly become enormous.
However, in two cases, it can be very useful to use syslog() to write this
information.
The first case is to set up your syslog.conf file so that the data is written
to a named pipe. In this case, normally not more than about 8192 bytes of
data will be kept before it is discarded by the system.
The second case is to setup your syslog.conf file so that the status data is
sent to another machine, which presumably then writes it to a named pipe.
Consequently, with this mechanism, provides a simple means of networking
apcupsd STATUS information.
Although we mention system logging of STATUS information, we strongly
recommend that you use apcaccess or the CGI interface to get this informa-
tion.
The Shutown Sequence and its Discontents
Shutdown Sequence
If you experienced so problems with the testing procedures, or if you are
porting apcupsd to another system, or you are simply curious, you may
want to know exactly what is going on during the shutdown process.
The shutdown sequence is as follows:
• apcupsd detects that there is a power problem and it calls
/etc/apcupsd/apccontrol powerout, which normally sends a mes-
sage to all users informing them of a potential problem.
• After approximately 5 seconds in the power problem mode, apcupsd
calls /etc/apcupsd/apccontrol onbattery, which normally sends a
message to all users informing them that the UPS is on batteries.
• When one of the conditions listed below occurs, apcupsd issues a shut-
down command by calling /etc/apcupsd/apccontrol doshutdown,
which should perform a shutdown of your system using the system
181