1UPSLOG(8)                         NUT Manual                         UPSLOG(8)
2
3
4

NAME

6       upslog - UPS status logger
7

SYNOPSIS

9       upslog -h
10
11       upslog [OPTIONS]
12

DESCRIPTION

14       upslog is a daemon that will poll a UPS at periodic intervals, fetch
15       the variables that interest you, format them, and write them to a file.
16
17       The default format string includes variables that are supported by many
18       common UPS models. See the description below to make your own.
19

OPTIONS

21       -h
22           Display the help message.
23
24       -f format
25           Monitor the UPS using this format string. Be sure to enclose format
26           in quotes so your shell doesn’t split it up. Valid escapes within
27           this string are:
28
29           %%
30               Insert a single "%"
31
32           %TIME format%
33               Insert the time with strftime formatting
34
35           %ETIME%
36               Insert the number of seconds, ala time_t. This is now a 10
37               digit number.
38
39           %HOST%
40               insert the local hostname
41
42           %UPSHOST%
43               insert the host of the UPS being monitored
44
45           %PID%
46               insert the pid of upslog
47
48           %VAR varname%
49               insert the value of variable varname
50
51       The default format string is:
52
53           %TIME @Y@m@d @H@M@S% %VAR battery.charge% %VAR input.voltage%
54           %VAR ups.load% [%VAR ups.status%] %VAR ups.temperature%
55           %VAR input.frequency%
56
57       -i interval
58           Wait this many seconds between polls. This defaults to 30 seconds.
59
60           If you require tighter timing, you should write your own logger
61           using the upsclient(3) library.
62
63       -l logfile
64           Store the results in this file.
65
66           You can use "-" for stdout, but upslog will remain in the
67           foreground.
68
69       -s ups
70           Monitor this UPS. The format for this option is
71           upsname[@hostname[:port]]. The default hostname is "localhost".
72
73       -u username
74           If started as root, upsmon will setuid(2) to the user id associated
75           with username for security.
76
77           If username is not defined, it will use the value that was compiled
78           into the program. This defaults to "nobody", which is less than
79           ideal.
80

SERVICE DELAYS

82       The interval value is merely the number given to sleep(3) after running
83       through the format string. Therefore, a query will actually take
84       slightly longer than the interval, depending on the speed of your
85       system.
86

LOG ROTATION

88       upslog writes its PID to upslog.pid, and will reopen the log file if
89       you send it a SIGHUP. This allows it to keep running when the log is
90       rotated by an external program.
91

SEE ALSO

93   Server:
94       upsd(8)
95
96   Clients:
97       upsc(8), upscmd(8), upsrw(8), upsmon(8)
98
99   Internet resources:
100       The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
101
102
103
104Network UPS Tools                 09/15/2011                         UPSLOG(8)
Impressum