upsagent - enables remote control over a local UPS on a serial device
upsagent [ -h, --help ] [ -M, --man ] [ -V, --version ] [ -d, --debug-level [debuglevel] ] [ -L, --logfile [logfile] ] [ -P, --port [port] ] [ -p, --pidfile pidfile ] [device-name]
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.
Displays a short usage help message and exits without errors.
Displays the embedded pod documentation of upsagent (this screen) using pod2man, groff and less as pager; it exits without errors.
Displays version information and exits without errors.
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.
Sets the logfile to logfile. If not specified, the default log file /var/run/upsagent.log will be used.
Sets the PID file to pidfile. If not specified, the default PID file /var/run/upsagent.pid will be used.
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.
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.
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.
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)
Christian Reile, Christian.Reile@t-online.de
To install Hardware::UPS::Perl::PID, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hardware::UPS::Perl::PID
CPAN shell
perl -MCPAN -e shell install Hardware::UPS::Perl::PID
For more information on module installation, please visit the detailed CPAN module installation guide.