man apcd (Administration système) - daemon for APC SmartUPS support
NAME
apcd - daemon for APC SmartUPS support
SYNOPSIS
/usr/sbin/apcd
/usr/sbin/apcd
{--version , -v}
DESCRIPTION
apcd can be used for controlling the APC SmartUPS. After the power failure, apcd will inform the users about the power failure once per minute. When the power is restored during user defined timeout, apcd will inform users about this fact. If power is not restored, the system shutdown will follow when the timeout expires. The whole shutdown is made inside the apcd , so no changes in the inittab are necessary. There is no communication between apcd and init(1) process.
apcd daemon also supports the networking mode. In this mode, one machine is configured as a master, with UPS attached to the serial port. Other machines (max. 10) are configured as a slaves. Master has a network connection with slaves and send them informations about timeouts, power restore etc. The master machine is also logging the UPS status informations to the text file.
The apcd must be run as root!
If you uses the --version or -v parameter, apcd prints the version infromation and exits.
If you send SIGUSR1 signal to apcd , it will dump status into /tmp/upsstat
CONFIGURATION
Firstly, you will need the cable between APC Smart UPS and PC computer running Linux. You can use either the special cable which is enclosed with the PowerChute (TM) software or you can make your own cable connected as follows:
PC (9 pin) APC (9 pin)
2 RxD 2
3 TxD 1
5 GND 9
Further, it is necessary to write configuration info to the file /etc/apcd.conf
This file is a plain ASCII file and you can use your favorite editor for configuration. For simple configuration, see enclosed sample file.
Configuration commands in /etc/apcd.conf are:
- for Master machine. Please specify which device is used for UPS communication. The default is /dev/ups.
- for Master machine. Skip the beep and the led test when apcd starts.
- for Master machine. This is the timeout between power failure and system shutdown. The default is 10 minutes for the master and 9 minutes for slaves. The timeout for slaves is always one minute less than master timeout.
- for Master machine. The name of the file for logging of UPS statistics.
- for Master machine. The name of the slave machine attached to the master. There can be max. 10 slaves attached to one master.
- for Slave machine. The name of the master which is authorised to send commands to this slave
DIAGNOSTICS
Error and information messages are logged to the syslog daemon.
FILES
/etc/apcd.conf
- configuration file
/var/adm/upsstat.log
- the UPS status is logged in this file. The file name can be configured in
/etc/apcd.conf
upsstat.log - FILE FORMAT
upsstat.log is a simple ascii file with several floating point numbers on one line. The format of the line is:
BatteryLoad LineMin LineMax UPSLoad LineFreq LineVoltage OutputVoltage UPSTemp BattVoltage
AUTHOR
Pavel Korensky <pavelk@dator3.anet.cz>
Bug fixes by Tibor Koleszar <oldw@debian.org>