.\" manual page [] for apcupsd .\" SH section heading .\" SS subsection heading .\" LP paragraph .\" IP indented paragraph .\" TP hanging label .TH apcupsd 8 "APC UPS management under Unix -- November 1999" .SH NAME apcupsd \- daemon for most APC's UPS for Unix .SH SYNOPSIS .B /usr/pkg/sbin/apcupsd .br .B /usr/pkg/etc/apcupsd/apccontrol .br .B /usr/pkg/etc/apcupsd/apcupsd.conf .br .B /usr/pkg/sbin/apcaccess .br .B /usr/pkg/sbin/apcnetd .br .SH DESCRIPTION .LP This daemon can be used for controlling the APC SmartUPS. During a power failure, "apcupsd" will inform the users about the power failure and that a shutdown may occur. If power is not restored, a system shutdown will follow when the battery is exausted, a timeout (seconds) expires, or runtime expires based on internal APC calculations determined by power consumption rates. If the power is restored before one of the above shutdown conditions is met, "apcupsd" will inform users about this fact. The shutdown is made by script calls to "/usr/pkg/etc/apcupsd/apccontrol", which is called by "apcupsd". Consequently, no changes to /etc/inittab are necessary. There is no communication between "apcupsd" and init(1) process. Apcupsd modifies the halt script so that at the end of the shutdown process, apcupsd will be re-executed in order to power off the UPS. .LP The "apcupsd" daemon now supports two networking modes that function independently, but if desired at the same time. Most users will probably enable the first network mode, which permits apcupsd to serve status and event information to clients over the network. The second networking mode is for multiple networked machines that are powered by the same UPS. In this mode, one machine is configured as a master with the UPS attached to the serial port. The other machines (max. 20) powered by the same UPS are configured as slaves. The master has a network connection with the slaves and sends them information about the UPS status. .SH OPTIONS .TP .B \-c --configure Attempts to configure the UPS EPROM to the values specified in the configuration file "/usr/pkg/etc/apcupsd/apcupsd.conf". .TP .B \-d --debug Turns on debugging output for a NETSLAVE or a NETMASTER. .TP .B \-f --config-file Specifies the location of the configuration file. The default is: /usr/pkg/etc/apcupsd/apcupsd.conf .TP .B \-k --killpower Attempt to turn the UPS off. This option is normally only used by the daemon itself to shut the UPS off after a system shutdown has completed. .TP .B \-n --rename-ups Attempts to change the UPS name stored in the UPS EPROM to that specified in your "/usr/pkg/etc/apcupsd/apcupsd.conf" file. .TP .B \-u --update-battery-date Attempts to update the battery date stored in the UPS EPROM. Normally done after a battery replacement. .TP .B \-V --version Prints the apcupsd version number and the usage. .TP .B \-? --help Prints a brief apcupsd help screen. .SH CONFIGURATION It may be necessary to change the configuration information in the file "/usr/pkg/etc/apcupsd/apcupsd.conf" to meet your needs and to correspond to your configuration. This file is a plain ASCII file and you can use your favorite editor to change it. .LP Configuration commands in .B /usr/pkg/etc/apcupsd/apcupsd.conf are: .LP .SS GENERAL CONFIGURATION COMMANDS .LP .B UPSCABLE -- .br [ simple | 940-0020B | 940-0023A (broken) ] .br [ smart | 940-0024B | 940-0024C ] .br [ 940-0095A | 940-0095C ] .br [ ether ] .LP .B UPSTYPE -- .br [ backups | sharebasic ] : Simple .br [ netups ] : Network Simple Signals .br [ backupspro | smartvsups | newbackupspro ] : SubSmart .br [ smartups | matrixups | sharesmart ] : Smart .LP [ backups | netups | backupspro | smartvsups ] and .br [ newbackupspro | smartups | matrixups ] are tested. .br [ sharebasic | sharesmart ] models are being tested. .LP .B DEVICE -- .br Please specify which device is used for UPS communication. The default is /dev/tty0[0|1|2|3]. .LP .B LOCKFILE -- .br By supplying this argument, "apcupsd" tries to create a lockfile for the serial port in the specified directory. .LP .SS CONFIGURATION COMMANDS USED BY THE NETWORK INFORMATION SERVER .LP .B NETSTATUS [on | off] .br This configuration command turns the network information server on or off. If it is on, apcupsd will spawn a child process that serves STATUS and EVENTS information over the network. This information is currently used by the Web based CGI programs. The default is on. In some cases, for added security, you may want to invoke a separate information server daemon from the inetd daemon. In this case, NETSTATUS should be off. .LP .B STATUSPORT .br This configuration command specifies the port to be used by the apcupsd server. The default is 7000. If you change this port, you must manually change the #define SERV_TCP_PORT in cgi/upsfetch.c and rebuild the CGI programs. .LP .B EVENTFILE .br If you want the apcupsd network information server to provide the last 10 events via the network, you must specify a file where apcupsd will save these events. The default is: /etc/apcupsd/apcupsd.events. Currently, apcupsd will save at most the last 50 events. When more than 50 events are recorded and a network request for the events arrives, the network server will truncate the file to the most recent 10 events. Consequently this file will not grow indefinitely as long as the events are checked from time to time. .LP .SS CONFIGURATION COMMANDS USED TO CONTROL SYSTEM LOGGING .LP .B STATTIME .LP .B STATFILE .LP .B DATATIME .LP .B FACILITY .LP .B CONFIGUATION COMMANDS USED DURING POWER FAILURES .LP .B ANNOY --