apcaccess man page

apcaccess — retrieve status information from apcupsd(8)

Synopsis

apcaccess [-f <config-file>] [-h <host>[:<port>]] [-p <parameter-name>] [-u] [<command>] [<host>[:<port>]]

Description

apcaccess is a program which prints out the complete status of most American Power Conversion Corp. (APC) UPSes provided you have the apcupsd(8) daemon installed, properly configured and running. It can access status information from any APC UPS attached to the localhost or attached to any computer on the network which is running apcuspd in NIS mode.

The command line options are:

-f

configuration file of apcupsd (default is usually /etc/apcupsd/apcupsd.conf)

-h

hostname and port of apcupsd to communicate with. The default hostname and port are obtained from the configuration file.

-p

Report only the value of the named parameter instead of all parameters and values.

-u

Remove units field for easier parsing by scripts.

<command>

An optional command, unless a hostname is also being specified. The only implemented command is status Shorthand for status localhost:3551. This produces a full printout of the available status information for the associated UPS.

<host>

An optional hostname which may be a bare machine name, fully qualified domain name or IP address.

:<port>

An optional port number where a hostname argument has been specified. The default is 3551, the official port number assigned by IANA for the apcupsd NIS server. The default hostname and port are obtained from the configuration file.

apcaccess uses apcupsd's inbuilt Network Information Server (NIS) -- no relation to Sun's NIS/YP service -- to obtain the current status information from the UPS on the local or remote computer. It is therefore necessary to have the following configuration directives:

in the /etc/apcupsd/apcupsd.conf configuration file so that the Network Information Server will be accessible. Firewall rules for appropriate network access may also be needed.

Status Report Format

The status report output format is simple ASCII. Generally there is a single piece of information on each line of output. The content varies based on the model of UPS being used and, in some cases, the firmware version.

Examples

Set out below is a sample of the status output which may be generated for the specified UPS models.

All models

APC

: version, number of records and number of bytes following

DATE

: Date and time of last update from UPS

HOSTNAME

: hostname of computer running apcupsd

VERSION

: apcupsd version number, date and operating system

UPSNAME

: UPS name from configuration file (dumb) or EEPROM (smart)

CABLE

: Cable type specified in the configuration file

MODEL

: UPS model derived from UPS information

UPSMODE

: Mode in which UPS is operating

STARTTIME

: Date and time apcupsd was started

STATUS

: UPS status. One or more of the following (space-separated): CAL TRIM BOOST ONLINE ONBATT OVERLOAD LOWBATT REPLACEBATT NOBATT SLAVE SLAVEDOWN

 
or
 
COMMLOST
 
or
 
SHUTTING DOWN
MASTERUPD

: Last time the master sent an update to the slave

ENDAPC

: Date and time of status information was written

Smart-UPS and Matrix-UPS (Smart Signalling)

LINEV

: Current input line voltage

LOADPCT

: Percentage of UPS load capacity used as estimated by UPS

BCHARGE

: Current battery capacity charge percentage

TIMELEFT

: Remaining runtime left on battery as estimated by the UPS

MBATTCHG

: Min battery charge % (BCHARGE) required for system shutdown

MINTIMEL

: Min battery runtime (MINUTES) required for system shutdown

MAXTIME

: Max battery runtime (TIMEOUT) after which system is shutdown

MAXLINEV

: Maximum input line voltage since apcupsd started

MINLINEV

: Min (observed) input line voltage since apcupsd started

OUTPUTV

: Current UPS output voltage

SENSE

: Current UPS sensitivity setting for voltage fluctuations

DWAKE

: Time UPS waits after power off when the power is restored

DSHUTD

: Delay before UPS powers down after command received

DLOWBATT

: Low battery signal sent when this much runtime remains

LOTRANS

: Input line voltage below which UPS will switch to battery

HITRANS

: Input line voltage above which UPS will switch to battery

RETPCT

: Battery charge % required after power off to restore power

ITEMP

: UPS internal temperature in degrees Celcius

ALARMDEL

: Delay period before UPS starts sounding alarm

BATTV

: Current battery voltage

LINEFREQ

: Current line frequency in Hertz

LASTXFER

: Reason for last transfer to battery since apcupsd startup

NUMXFERS

: Number of transfers to battery since apcupsd startup

XONBATT

: Date, time of last transfer to battery since apcupsd startup

TONBATT

: Seconds currently on battery

CUMONBATT

: Cumulative seconds on battery since apcupsd startup

XOFFBAT

: Date, time of last transfer off battery since apcupsd startup

SELFTEST

: Date and time of last self test since apcupsd startup

STESTI

: Self-test interval

STATFLAG

: UPS status flag in hex

DIPSW

: Current UPS DIP switch settings

REG1

: Fault register 1 in hex

REG2

: Fault register 2 in hex

REG3

: Fault register 3 in hex

MANDATE

: UPS date of manufacture

SERIALNO

: UPS serial number

BATTDATE

: Date battery last replaced (if set)

NOMOUTV

: Nominal output voltage to supply when on battery power

NOMBATTV

: Nominal battery voltage

EXTBATTS

: Number of external batteries (for XL models)

BADBATTS

: Number of bad external battery packs (for XL models)

FIRMWARE

: UPS firmware version

APCMODEL

: APC model information

Newer Back-UPS Pro (Smart Signalling)

LINEV

: Current input line voltage

LOADPCT

: Percentage of UPS load capacity used

MBATTCHG

: Min battery charge % (BCHARGE) required for system shutdown

MINTIMEL

: Min battery runtime (MINUTES) required for system shutdown

MAXTIME

: Max battery runtime (TIMEOUT) after which system is shutdown

MAXLINEV

: Maximum input line voltage since apcupsd startup

MINLINEV

: Minimum input line voltage since apcupsd startup

OUTPUTV

: Current UPS output voltage

BATTV

: Current battery charge voltage

STATFLAG

: UPS status flag in hex

Back-UPS RS 1500 (USB)

LINEV

: Current input line voltage

LOADPCT

: Percentage of UPS load capacity used

BCHARGE

: Current battery capacity charge percentage

TIMELEFT

: Remaining runtime left on battery as estimated by UPS

MBATTCHG

: Min battery charge % (BCHARGE) required for system shutdown

MINTIMEL

: Min battery runtime (MINUTES) required for system shutdown

MAXTIME

: Max battery runtime (TIMEOUT) after which system is shutdown

*OUTPUTV

: Current UPS output voltage

*DWAKE

: Time UPS waits after power off when the power is restored

*DSHUTD

: Delay before UPS powers down after command received

LOTRANS

: Input line voltage below which UPS will switch to battery

HITRANS

: Input line voltage above which UPS will switch to battery

*RETPCT

: Battery charge % required after power off to restore power

*ITEMP

: UPS internal temperature in degrees Celcius

ALARMDEL

: Delay period before UPS starts sounding alarm

BATTV

: Current battery voltage

*LINEFREQ

: Current line frequency in Hertz

*LASTXFER

: Reason for last transfer to battery since apcupsd startup

NUMXFERS

: Number of transfers to battery since apcupsd startup

XONBATT

: Date, time of last transfer to battery since apcupsd startup

TONBATT

: Seconds currently on battery

CUMONBATT

: Cumulative seconds on battery since apcupsd startup

XOFFBAT

: Date, time of last transfer off battery since apcupsd startup

SELFTEST

: Date and time of last self test since apcupsd startup

STATFLAG

: UPS status flag in hex

MANDATE

: UPS date of manufacture

SERIALNO

: UPS serial number

BATTDATE

: Date battery last replaced (if set)

NOMBATTV

: Nominal battery voltage

FIRMWARE

: UPS firmware version

APCMODEL

: APC model information

* presence dependant on USB firmware version.

Web/SNMP (AP9716) or PowerNet SNMP (AP9605) SmartSlot Card

LINEV

: Current input line voltage

LOADPCT

: Percentage of UPS load capacity used as estimated by UPS

BCHARGE

: Current battery capacity charge percentage

TIMELEFT

: Remaining runtime left on battery as estimated by UPS

MBATTCHG

: Min battery charge % (BCHARGE) required for system shutdown

MINTIMEL

: Min battery runtime (MINUTES) required for system shutdown

MAXTIME

: Max battery runtime (TIMEOUT) after which system is shutdown

MAXLINEV

: Maximum input line voltage since apcupsd startup

MINLINEV

: Minimum input line voltage since apcupsd startup

OUTPUTV

: UPS output voltage

SENSE

: Current UPS sensitivity setting for voltage fluctuations

DWAKE

: Time UPS waits after power off when the power is restored

DSHUTD

: Delay before UPS powers down after command received

DLOWBATT

: Low battery signal sent when this much runtime remains

LOTRANS

: Input line voltage below which UPS will switch to battery

HITRANS

: Input line voltage above which UPS will switch to battery

RETPCT

: Battery charge % required after power off to restore power

ITEMP

: UPS internal temperature in degrees Celcius

ALARMDEL

: Delay period before UPS starts sounding alarm

LINEFREQ

: Current line frequency in Hertz

NUMXFERS

: Number of transfers to battery since apcupsd startup

TONBATT

: Seconds currently on battery

CUMONBATT

: Cumulative seconds on battery since apcupsd startup

XOFFBATT

: Date, time of last transfer off battery since apcupsd startup

STESTI

: Self-test interval

STATFLAG

: UPS status flag in hex

DIPSW

: Current UPS DIP switch settings

MANDATE

: UPS date of manufacture

SERIALNO

: UPS serial number

BATTDATE

: Date battery last replaced (if set)

NOMOUTV

: Nominal output voltage to supply when on battery power

NOMPOWER

: Nominal power output in watts

EXTBATTS

: Number of external batteries (for XL models)

BADBATTS

: Number of bad external battery packs (for XL models)

FIRMWARE

: UPS firmware version

APCMODEL

: APC model information

Share-UPS (AP9270) (Basic port)

MBATTCHG

: Min battery charge % (BCHARGE) required for system shutdown

MINTIMEL

: Min battery runtime (MINUTES) required for system shutdown

MAXTIME

: Max battery runtime (TIMEOUT) after which system is shutdown

NUMXFERS

: Number of transfers to battery since apcupsd startup

TONBATT

: Seconds currently on battery

CUMONBATT

: Cumulative seconds on battery since apcupsd startup

XOFFBATT

: Date, time of last transfer off battery since apcupsd startup

STATFLAG

: UPS status flag in hex

UPS Environmental Monitoring SmartSlot Card (AP9612TH)

HUMIDITY

: Ambient humidity

AMBTEMP

: Ambient temperature

Back-UPS Pro and Smart-UPS v/s (Smart Signalling)

LINEFAIL

: Input line voltage status.

BATTSTAT

: Battery status.

LASTXFER

: Last (observed) transfer to battery.

Back-UPS and Net-UPS (Simple Signalling)

LINEFAIL

: Input line voltage status.

BATTSTAT

: Battery status.

STATFLAG

: UPS status flag in hex.

Files

/etc/apcupsd/apcupsd.conf

See Also

apcupsd.conf(5), apcupsd(8).

The HTML apcupsd manual installed on your system or available online at http://www.apcupsd.org/

Authors

This page

Trevor Roydhouse

Software


Adam Kropelin (current Project Manager and Code Maintainer)


Kern Sibbald (former Project Manager and Code Maintainer)


Riccardo Facchetti (former Project Manager and Code Maintainer)


Andre M. Hedrick (Project Founder and former Code Maintainer)

Contributors

An enormous number of users who have devoted their time and energy to this project -- thanks.

Referenced By

apcupsd(8), apcupsd.conf(5).

March 28, 2014