UPSD

Section: Misc. Reference Manual Pages (1M)
Index Return to Main Contents
 

NAME

upsd - UPS monitor daemon  

SYNOPSIS

/etc/upsd [-d tty] [-c cmd] [-l file] [-f file] [-r file] [-t min]  

DESCRIPTION

Upsd monitors the serial port connected to an UPS device and will perform an unattended shutdown of the system if the UPS is on battery longer than a specified number of minutes. Upsd needs to watch a tty with modem control properties, and expects the UPS to raise DCD when it switches to battery backup and drop DCD when it goes back to an online state.  

OPTIONS

upsd has the following command line options:
-d tty
Specifies the full pathname (including the /dev prefix) to the tty device the UPS is on. This must be a modem control type device.

-c cmd
Specifies the full pathname of the command to be executed to shut down the system. This command must be enclosed in quotes if it consists of 2 or more words.

-l file
Specifies the logfile upsd will write it's event messages to, these messages give the date and time that the UPS daemon started, switched to battery, switched back to online, executed the shutdown command, or was terminated via SIGTERM.

-f file
Specifies the path name of the failure message file to broadcast to all users in the event of a power failure. The failure message file is simply an ASCII text file which you can create with an editor such as vi(1). If the file is not found by upsd , no message will be broadcast upon power failure.

-r file
Specifies the path name of the restore message file to broadcast to all users in the event of power restore. The restore message file is simply an ASCII text file which you can create with an editor such as vi(1). If the file is not found by upsd , no message will be broadcast upon power restore.

-t min
Specifies the number of minutes to allow the UPS to be on battery backup before executing the shutdown sequence. This number must be between 1 and 30. Be careful not to choose a value greater than the number of minutes of battery time your UPS supports with your current load. A value in the 5 to 10 minute range is probably sufficient.

 

ENVIRONMENT VARIABLES

The following environment variables can be set if that interface is preferred to the command line options. Note that command line options override the environment variable settings.

Environment    Equivalent              Default
Variable                Command line option     Value
UPSPORT                 -p                      /dev/ttyFM00
UPSSHUT                 -c                      "/etc/shutdown -y -i0"
UPSLOG                  -l                      /etc/upslog
UPSFAIL                 -f                      /etc/upsfail
UPSREST                 -r                      /etc/upsrest
UPSTIME                 -t                      10

 

FILES

/etc/upslog            upsd event log

/etc/upsfail           upsd failure message file

/etc/upsrest           upsd restore message file
 

SEE ALSO

shutdown(1M), wall(1).  

AUTHOR

Arthur W. Neilson III
art@pilikia.pegasus.com


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
ENVIRONMENT VARIABLES
FILES
SEE ALSO
AUTHOR

This document was created by man2html, using the manual pages.
Time: 21:53:41 GMT, February 02, 2023