User's Manual UPS control system
Table Of Contents
- Apcupsd User's Manual
- Release Notes
- How To Use This Manual
- Basic User's Guide
- Planning Your Installation
- Building and Installing apcupsd
- After Installation
- Configuration Examples
- Testing Apcupsd
- Troubleshooting Your Installation
- Monitoring and Tuning your UPS
- Maintaining Your UPS
- Frequently-Asked Questions
- Apcupsd Bugs
- Advanced topics
- Customizing Event Handling
- Master/Slave Configurations
- Controlling Multiple UPSes on one Machine
- Support for SNMP UPSes
- Alternate Ways To Run The Network Information Server
- apcupsd System Logging
- Installation: Windows
- Windows Version of apcupsd
- Installation: Serial-Line UPSes
- Overview of Serial-Interface UPSes
- Connecting a Serial-Line UPS to a USB Port
- Connecting a APC USB UPS to either a PC USB or Serial Port
- Cables
- Smart-Custom Cable for SmartUPSes
- Smart Signalling Cable for BackUPS CS Models
- Voltage-Signalling Cable for "dumb" UPSes
- Other APC Cables that apcupsd Supports
- Voltage Signalling Features Supported by Apcupsd for Various Cables
- Voltage Signalling
- Back-UPS Office 500 signals
- Analyses of APC Cables
- Win32 Implementation Restrictions for Simple UPSes
- Internal Apcupsd Actions for Simple Cables
- RS232 Wiring and Signal Conventions
- Pin Assignment for the Serial Port (RS-232C), 25-pin and 9-pin, Female End
- Ioctl to RS232 Correspondence
- Testing Serial-Line UPSes
- Troubleshooting Serial Line communications
- Recalibrating the UPS Runtime
- DATA Logging
- Technical Reference
- Configuration Directive Reference
- apcupsd Status Logging
- Shutown Sequence and its Discontents
- APC smart protocol
- Apcupsd --- RPM Packaging FAQ
- Credits
- Kernel Config
Status logging consists of periodically logging ALL available information
concerning the UPS. Since the volume of data is rather large (over 1000
bytes per status), the STATUS data is not automatically sent to the system
log file, instead, it is written as a series of data records to a specific file
(normally /etc/apcupsd/apcupsd.status).
After each write, the file is rewound so that the size of the file remains
constant. At the current time, this file is 1135 bytes. The format of this file
is very similar to the old apcupsd procfs file. The STATUS file is kept for
backward compatibility and will be eliminated in a future version of apcupsd.
The preferred method for obtaining this information is from apcaccess or by
using the CGI interface (see apcupsd Network Monitoring [CGI] Programs).
To make reading the status data reliable via a named pipe, the first record
written contains a version number, the number of records that follow the
first record, and the total number of bytes in those subsequent records. An
actual example of such a status file (/etc/apcupsd/apcupsd.status) is:
Consequently, the first record always consists of 24 bytes (23 characters
followed by a newline). This record starts with APC and as indicated in the
example above is followed by 28 records consisting of 675 bytes. The last
record begins with END APC and contains the date and time matching the
DATE record.
Documentation of each record needs to be written. In the coming weeks,
I plan to add additional records and possibly change the names of some of
the fields.
When this data is written to a file, it is written as two records, the first
record, and all the other records together. In reading the file, it can be
either be read a record at a time, or in one big read.
When this data is written to syslog(), it is written a record at a time. The
first record is the first 24 bytes. By having the number of records and the
size in the first record, the complete status can be reliably reassembled.
Status Report Example
An example of output from an international SmartUPS 1000 follows:
DATE : Wed Sep 27 17:30:23 CEST 2000
HOSTNAME : polymatou.sibbald.com
RELEASE : 3.7.3-20000925
CABLE : Custom Cable Smart
176










