Christian Reile > perl-Hardware-UPS-Perl-0.43 > upsagent

Download:
UPS/perl-Hardware-UPS-Perl-0.43.tar.gz

Annotate this POD

View/Report Bugs
Source  

NAME ^

upsagent - enables remote control over a local UPS on a serial device

SYNOPSIS ^

upsagent-h--help ] [ -M--man ] [ -V--version ] [ -d--debug-level [debuglevel] ] [ -L--logfile [logfile] ] [ -P--port [port] ] [ -p--pidfile pidfile ] [device-name]

DESCRIPTION ^

upsagent enables remote control over a local UPS on a serial device specified by the optional device-name parameter via TCP/IP using port port. If device-name is omitted, /dev/ttyS0, i.e. the COM1 port, is used per default unless overriden by the environment variable UPS_PORT. If the TCP/IP port port is not specified port 9050 is used unless overriden by the environment variable UPS_TCPPORT.

The program listens on port for incoming requests and sends the data received to the local UPS. The answer of the UPS is sent back.

OPTIONS ^

-h, --help

Displays a short usage help message and exits without errors.

-M, --man

Displays the embedded pod documentation of upsagent (this screen) using pod2man, groff and less as pager; it exits without errors.

-V, --version

Displays version information and exits without errors.

-d, --debug-level [debuglevel]

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.

-L, --logfile logfile

Sets the logfile to logfile. If not specified, the default log file /var/run/upsagent.log will be used.

-p, --pidfile pidfile

Sets the PID file to pidfile. If not specified, the default PID file /var/run/upsagent.pid will be used.

-P, --port port

Sets the TCP/IP port port the programs waits for incoming requests to the local UPS. If not specified, the default port 9050 is used unless overriden by the environment variable UPS_TCPPORT.

EXAMPLES ^

upsagent

Listens on TCP/IP port 9050 for incoming requests and sends them to the local UPS on COM1. The response of the UPS is sent back.

upsagent -p 1200 /dev/ttyS1

Listens on TCP/IP port 1200 for incoming requests and sends them to the local UPS on COM2. The response of the UPS is sent back.

SEE ALSO ^

groff(1), less(1), pod2man(1), upsadm(1), upsstat(1), upswatch(1), Getopt::Long(3pm), IO::Select(3pm), IO::Socket::INET(3pm), Net::hostent(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)

AUTHOR ^

Christian Reile, Christian.Reile@t-online.de

syntax highlighting: