upsadm - administrates an UPS using an Hardware::UPS::Perl driver indirectly via TCP or directly on a serial device
upsadmin [ -h, --help ] [ -M, --man ] [ -V, --version ] [ -D, --driver driver ] [ -d, --debug-level [debuglevel] ] [ -r, --remote [HOST:[PORT]] [ -T, --toggle-beeper ] [ -t, --test [period] ] [ -B, --test-battery-low ] [ -c, --cancel-test ] [ -S, --shutdown period ] [ -R, --restore period ] [ -C, --cancel-shutdown ] [device-name]
upsadm is a command line utility to administrate an UPS using a driver specified on the command line. There are to ways of operating:
On the one hand, the UPS can reside on a local serial device specified by the optional device-name parameter. If the parameter is omitted, /dev/ttyS0, i.e. the COM1 port, is used per default unless overriden by the environment variable UPS_DEVICE.
On the other hand, the UPS can be administrated via TCP/IP, if there is an UPS agent running at a remote host speciefied by the --remote option.
Displays a short usage help message and exits without errors.
Displays the embedded pod documentation of upswatch (this screen) using pod2man, groff and less as pager; it exits without errors.
Displays version information and exits without errors.
Sets the UPS driver driver to use. driver is a case-insensitive string. If not specified, the default driver "Megatec" is used.
Sets the integer debug level debuglevel. If the debug level is not specified, a default of 1 is assumed. A higher debug level will increase the verbosity. The maximum is 5.
Switches to the remote operation modus, i.e. the UPS is watched via TCP/IP using a remotely running UPS agent. The remote site is specified by the HOST and optionally the TCP port PORT separated by ':'. If not specified, the local host's default FQDN will be used together with default TCP port 9050.
Toggles the beeper.
Tests the UPS for a period of PERIOD in minutes. If the argument is omitted, a standard test lasting 10 seconds is performed.
Tests the UPS until the battery is low.
Cancels any test activity.
Causes the UPS to shutdown in a period of PERIOD minutes.
Restores the UPS after a period of PERIOD minutes after a shutdown has been performed. This option requires the option --shutdown.
Cancels any shutdown activity.
Tests the UPS.
Tests the UPS on COM2 for 10 minutes.
Tests the UPS located at host 192.168.1.2 via an UPS agent listening at TCP port 7030 at this host.
groff(1), less(1), pod2man(1), upsagent(1), upsstat(1), upswatch(1), Getopt::Long(3pm), Hardware::UPS::Perl::Connection(3pm), Hardware::UPS::Perl::Connection::Net(3pm), Hardware::UPS::Perl::Connection::Serial(3pm), Hardware::UPS::Perl::Constants(3pm), Hardware::UPS::Perl::Driver(3pm), Hardware::UPS::Perl::Driver::Megatec(3pm), Hardware::UPS::Perl::General(3pm), Hardware::UPS::Perl::Logging(3pm), Hardware::UPS::Perl::PID(3pm), Hardware::UPS::Perl::Utils(3pm)
Christian Reile, Christian.Reile@t-online.de
To install Hardware::UPS::Perl::PID, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.