upslog (8) - Linux Man Pages
upslog: UPS status logger
upslog - UPS status logger
upslog is a daemon that will poll a UPS at periodic intervals, fetch the variables that interest you, format them, and write them to a file.
- Display the help message.
Monitor the UPS using this format string. Be sure to enclose
in quotes so your shell doesn't split it up. Valid escapes within this string are:
- Insert a single "%"
- Insert the time with strftime formatting
- Insert the number of seconds, ala time_t. This is now a 10 digit number.
- insert the local hostname
- insert the host of the UPS being monitored
- insert the pid of upslog
- insert the value of variable varname
The default format string is:
%TIME @Y@m@d @H@M@S% %VAR battery.charge% %VAR input.voltage% %VAR ups.load% [%VAR ups.status%] %VAR ups.temperature% %VAR input.frequency%
Wait this many seconds between polls. This defaults to 30 seconds.
If you require tighter timing, you should write your own logger using the upsclient(3) library.
Store the results in this file.
You can use "-" for stdout, but upslog will remain in the foreground.
- Monitor this UPS. The format for this option is upsname[@hostname[:port]]. The default hostname is "localhost".
If started as root, upsmon will
setuid(2) to the user id associated with
If username is not defined, it will use the value that was compiled into the program. This defaults to "nobody", which is less than ideal.
The interval value is merely the number given to sleep(3) after running through the format string. Therefore, a query will actually take slightly longer than the interval, depending on the speed of your system.
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/