02.12.2015 Views

Network UPS Tools User Manual

Network UPS Tools User Manual

Network UPS Tools User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Network</strong> <strong>UPS</strong> <strong>Tools</strong> <strong>User</strong> <strong>Manual</strong> 5 / 84<br />

2.10.3 Additional Information<br />

More information on configuring upsmon can be found in these places:<br />

• The upsmon(8) man page<br />

• Typical setups for big servers<br />

• Configuring automatic <strong>UPS</strong> shutdowns chapter<br />

• The stock upsmon.conf that comes with the package<br />

2.11 Clients<br />

Clients talk to upsd over the network and do useful things with the data from the drivers. There are tools for command line<br />

access, and a few special clients which can be run through your web server as CGI programs.<br />

For more details on specific programs, refer to their man pages.<br />

2.11.1 upsc<br />

upsc is a simple client that will display the values of variables known to upsd and your <strong>UPS</strong> drivers. It will list every variable<br />

by default, or just one if you specify an additional argument. This can be useful in shell scripts for monitoring something without<br />

writing your own network code.<br />

upsc is a quick way to find out if your driver(s) and upsd are working together properly. Just run upsc to see what’s<br />

going on, i.e.:<br />

morbo:~$ upsc sparky@localhost<br />

ambient.humidity: 035.6<br />

ambient.humidity.alarm.maximum: NO,NO<br />

ambient.humidity.alarm.minimum: NO,NO<br />

ambient.temperature: 25.14<br />

...<br />

If you are interested in writing a simple client that monitors upsd, the source code for upsc is a good way to learn about using<br />

the upsclient functions.<br />

See the upsc(8) man page and NUT command and variable naming scheme for more information.<br />

2.11.2 upslog<br />

upslog will write status information from upsd to a file at set intervals. You can use this to generate graphs or reports with<br />

other programs such as gnuplot.<br />

2.11.3 upsrw<br />

upsrw allows you to display and change the read/write variables in your <strong>UPS</strong> hardware. Not all devices or drivers implement<br />

this, so this may not have any effect on your system.<br />

A driver that supports read/write variables will give results like this:<br />

$ upsrw sparky@localhost<br />

( many skipped )

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!