7
upslog - UPS status logger
19
*upslog* is a daemon that will poll a UPS at periodic intervals, fetch the
20
variables that interest you, format them, and write them to a file.
22
The default format string includes variables that are supported by many
23
common UPS models. See the description below to make your own.
29
Display the help message.
32
Monitor the UPS using this format string. Be sure to enclose
33
'format' in quotes so your shell doesn't split it up. Valid escapes
34
within this string are:
36
%%;; Insert a single "%"
38
%TIME format%;; Insert the time with strftime formatting
40
%ETIME%;; Insert the number of seconds, ala time_t. This is now a
43
%HOST%;; insert the local hostname
45
%UPSHOST%;; insert the host of the UPS being monitored
47
%PID%;; insert the pid of upslog
49
%VAR varname%;; insert the value of variable varname
51
The default format string is:
53
%TIME @Y@m@d @H@M@S% %VAR battery.charge% %VAR input.voltage%
54
%VAR ups.load% [%VAR ups.status%] %VAR ups.temperature%
59
Wait this many seconds between polls. This defaults to 30 seconds.
61
If you require tighter timing, you should write your own logger using
62
the linkman:upsclient[3] library.
66
Store the results in this file.
68
You can use "-" for stdout, but upslog will remain in the foreground.
71
Monitor this UPS. The format for this option is
72
+upsname[@hostname[:port]]+. The default hostname is "localhost".
76
If started as root, upsmon will *setuid*(2) to the user id
77
associated with 'username' for security.
79
If 'username' is not defined, it will use the value that was compiled into the
80
program. This defaults to "nobody", which is less than ideal.
85
The interval value is merely the number given to *sleep*(3) after running
86
through the format string. Therefore, a query will actually take slightly
87
longer than the interval, depending on the speed of your system.
92
*upslog* writes its PID to `upslog.pid`, and will reopen the log file if you
93
send it a SIGHUP. This allows it to keep running when the log is rotated
94
by an external program.
105
linkman:upsc[8], linkman:upscmd[8],
106
linkman:upsrw[8], linkman:upsmon[8]
110
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/