Subsections

1.1 APCUPSD - Daemon for APC USVs

1.1.1 Introduction

This package provides the APCUPSD daemon [1] for monitoring APC-USVs on fli4l. All settings are taken from the orginal package [2].

1.1.2 Configuration of the APCUPSD package

The configuration is made, as of all fli4l packages, by adjusting the file
path/fli4l-3.10.1/<config>/apcupsd.txt to meet your own demands.

OPT_APCUPSD

The setting 'no' deactivates OPT_APCUPSD ompletely. There will be no changes made on the fli4l boot medium or the archive opt.img. OPT_APCUPSD does not overwrite other parts of the fli4l installation. To activate OPT_APCUPSD set the variable OPT_APCUPSD to 'yes'.

1.1.3 Communication settings

APCUPSD_UPSNAME

Use this to give your UPS a name in log files and such.

This is particulary useful if you have multiple UPSes. This does not set the EEPROM. It should be 8 characters or less.

APCUPSD_UPSCABLE

Defines the type of cable connecting the UPS to fli4l.

Possible generic choices for APCUPSD_UPSCABLE are:

'simple', 'smart', 'ether' or 'usb'

Or a specific cable model number may be used:

'940-0119A', '940-0127A', '940-0128A', '940-0020B', '940-0020C', '940-0023A', '940-0024B', '940-0024C', '940-1524C', '940-0024G', '940-0095A', '940-0095B', '940-0095C'or 'M-04-02-2000'

APCUPSD_UPSTYPE

To get apcupsd to work, in addition to defining the APCUPSD_UPSCABLE, you must also define a UPS type , which corresponds to the type of UPS you have set in APCUPSD_UPSDEVICE.

APCUPSD_UPSDEVICE

You must also specify a device, sometimes referred to as a port.

For USB UPSes, please leave the APCUPSD_UPSDEVICE directive blank. For other UPS types, you must specify an appropriate port or address as described in the following table:

UPS type Device
  Description
   
'apcsmart' '/dev/tty*'
  Newer serial character device, appropriate for SmartUPS models using a serial cable (not USB).
   
'usb' ''
  Most new UPSes are USB. A blank APCUPSD_UPSDEVICE setting enables autodetection, which is the best choice for most installations.
   
'net' 'hostname:port'
  Network link to a master apcupsd through apcupsd's Network Information Server. This is used if the UPS powering the fli4l is connected to a different computer for monitoring.
   
'pcnet' 'ipaddr:username:passphrase[:port]'
  PowerChute Network Shutdown protocol which can be used as an alternative to SNMP with the AP9617 family of smart slot cards.

ipaddr is the IP address of the UPS management card.

username and passphrase are the credentials for which the card has been configured.

port is the port number on which to listen for messages from the UPS, normally 3052. If this parameter is empty or missing, the default of 3052 will be used.

APCUPSD_POLLTIME

Interval in seconds at which apcupsd polls the UPS for status.

This setting applies both to directly-attached UPSes (APCUPSD_UPSTYPE 'apcsmart', 'usb') and networked UPSes (APCUPSD_UPSTYPE 'net', 'pcnet'). Lowering this setting will improve apcupsd's responsiveness to certain events at the cost of higher CPU utilization (default '60'). The default of 60 seconds is appropriate for most situations.

1.1.4 Directory settings

APCUPSD_LOCKFILE

Path for device lock file (default '/var/lock').

APCUPSD_SCRIPTDIR

Path to script directory in which apccontrol and event scripts are located. (default '/etc')

APCUPSD_PWRFAILDIR

Path to powerfail directory in which to write the powerfail flag file.

This file is created when apcupsd initiates a system shutdown and is checked in the OS halt scripts to determine if a killpower (turning off UPS output power) is required (default '/etc').

APCUPSD_NOLOGINDIR

Path to nologin directory in which to write the nologin file. The existence of this flag file tells the OS to disallow new logins (default '/etc').

1.1.5 Powerfail settings

APCUPSD_ONBATTERYDELAY

The time in seconds from when a power failure is detected until we react to it with an onbattery event (default '6')

This means that, apccontrol will be called with the powerout argument immediately when a power failure is detected. However, the onbattery argument is passed to apccontrol only after the APCUPSD_ONBATTERYDELAY time. If you don't want to be annoyed by short powerfailures, make sure that apccontrol powerout does nothing i.e. comment out the wall.

APCUPSD_BATTERYLEVEL

If during a power failure, the remaining battery percentage (as reported by the UPS) is below or equal to APCUPSD_BATTERYLEVEL, apcupsd will initiate a system shutdown (default '5')

APCUPSD_MINUTES

If during a power failure, the remaining runtime in minutes (as calculated internally by the UPS) is below or equal to APCUPSD_MINUTES, apcupsd, will initiate a system shutdown (default '3').

APCUPSD_TIMEOUT

If during a power failure, the UPS has run on batteries for APCUPSD_TIMEOUT seconds or longer, apcupsd will initiate a system shutdown (default '0'). A value of '0' disables this timer.

Note, if you have a Smart UPS, you will most likely want to disable this timer by setting it to zero. That way, you UPS will continue on batteries until either the % charge remaing drops to or below APCUPSD_BATTERYLEVEL, or the remaining battery runtime drops to or below APCUPSD_MINUTES. Of course, if you are testing, setting this to '60' causes a quick system shutdown if you pull the power plug. If you have an older dumb UPS, you will want to set this to less than the time you know you can run on batteries.

Note: APCUPSD_BATTERYLEVEL, APCUPSD_MINUTES and APCUPSD_TIMEOUT work in conjunction, so the first that occurs will cause the initation of a shutdown.

APCUPSD_ANNOY

Time in seconds between annoying users to signoff prior to system shutdown (default '300'). '0' disables.

APCUPSD_ANNOYDELAY

Initial delay after power failure before warning users to get off the system (default '60').

APCUPSD_NOLOGON

The condition which determines when users are prevented from logging in during a power failure. APCUPSD_NOLOGON has to be one of 'disable', 'timeout', 'percent', 'minutes' or 'always' (default 'disable').

APCUPSD_KILLDELAY

If this value is non-zero, apcupsd will continue running after a shutdown has been requested, and after the specified time in seconds attempt to kill the power. This is for use on systems where apcupsd cannot regain control after a shutdown (default '0'). '0' disables.

1.1.6 Network server settings

APCUPSD_NETSERVER

The value 'yes' enables, 'no' disables the network information server. If 'yes', a network information server process will be started for serving the STATUS and EVENT data over the network (used by CGI programs) (default 'no').

APCUPSD_NISIP

IP address on which NIS server will listen for incoming connections. This is useful if your server is multi-homed (has more than one network interface and IP address). Default value is '0.0.0.0' which means any incoming request will be serviced. Alternatively, you can configure this setting to any specific IP address of your server and NIS will listen for connections only on that interface. Use the loopback address ('127.0.0.1') to accept connections only from the local machine.

APCUPSD_NISPORT

Port to use for sending STATUS and EVENTS data over the network. It is not used unless APCUPSD_NETSERVER is 'on'. If you change this port, you will need to change the corresponding value in the cgi directory and rebuild the cgi programs. Default is '3551' as registered with the IANA.

APCUPSD_EVENTSFILE

If you want the last few EVENTS to be available over the network by the network information server, you must define an EVENTSFILE. (default '/var/log/apcupsd.events')

APCUPSD_EVENTSFILEMAX

By default, the size of the APCUPSD_EVENTSFILE will be not be allowed to exceed 10 kilobytes. When the file grows beyond this limit, older EVENTS will be removed from the beginning of the file (first in first out). The parameter APCUPSD_EVENTSFILEMAX can be set to a different kilobyte value, or set to zero to allow the APCUPSD_EVENTSFILE to grow without limit.

1.1.7 Configuration for share the UPS

APCUPSD_UPSCLASS

Normally 'standalone' unless you share an UPS using an APC ShareUPS card. APCUPSD_UPSCLASS may have an value of 'standalone', 'shareslave' or 'sharemaster' (default 'standalone').

APCUPSD_UPSMODE

Normally 'disable' unless you share an UPS using an APC ShareUPS card. APCUPSD_UPSMODE may have an value of 'disable' or 'share' (default 'disable').

1.1.8 Logging system

APCUPSD_STATTIME

Time interval in seconds between writing the STATUS file (default '0'). '0' disables.

APCUPSD_STATFILE

Location of STATUS file (written only if APCUPSD_STATFILE is non-zero) (default '/var/log/apcupsd.status').

APCUPSD_LOGSTATS

'on' enables, 'off' disables the logging of status.

Note! This generates a lot of output, so if turn this on, be sure that the file defined in syslog.conf for LOG_NOTICE is a named pipe (default 'off'). You probably do not want to set this to 'on'.

APCUPSD_DATATIME

Time interval in seconds between writing the DATA records to the log file (default '0'). '0' disables.

APCUPSD_FACILITY

Defines the logging facility (class) for logging to syslog. If not specified, it defaults to 'daemon'. This is useful if you want to separate the data logged by apcupsd from other programs.

1.1.9 Event Mail

OPT_APCUPSD_EVENTMAIL

If set to 'yes' event mails will be sent to the address in APCUPSD_EVENTMAIL_TO via the SMTP host configured in APCUPSD_EVENTMAIL_HOST (default 'no').

APCUPSD_EVENTMAIL_HOST

Name or IP address of the SMTP host transfering the event mails.

APCUPSD_EVENTMAIL_TO

The email address receiving event mails is to be entered here.

© 2001-2015 The fli4l-Team - 27 January 2015