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.
Store the results in this file.
You can use - for stdout, but upslog will remain in the foreground.
Wait this many seconds between polls.
Remember that a poll is not instantaneous, so it will slip back as the program runs. If you require tighter timing, you should write your own logger using the upsfetch library.
The string to log, including variables from the UPS. Valid escapes within this string are:
%% - insert a single %
%TIME format% - insert the time with strftime formatting
%ETIME% - insert the number of seconds, ala time_t. This is now a 10 digit number.
%HOST% - insert the local hostname
%UPSHOST% - insert the host of the UPS being monitored
%PID% - insert the pid of upslog
%VAR varname% - insert the value of variable varname
The default format string is:
The NUT (Network UPS Tools) home page: http://www.exploits.org/nut/