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

ON-DEMAND LOGGING

88       Sending a USR1 signal to a running upslog process makes it wake from
89       the current sleep and log immediately. This is useful when triggered
90       from a upssched event trigger (e.g. AT ONBATT or AT ONLINE) to ensure
91       that an entry always exists, even if the power goes away for a period
92       of time shorter than that specified by the -i argument.
93

LOG ROTATION

95       upslog writes its PID to upslog.pid, and will reopen the log file if
96       you send it a SIGHUP. This allows it to keep running when the log is
97       rotated by an external program.
98

SEE ALSO

100   Server:
101       upsd(8)
102
103   Clients:
104       upsc(8), upscmd(8), upsrw(8), upsmon(8), upssched(8)
105
106   Internet resources:
107       The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
108
109
110
111Network UPS Tools 2.7.3.          12/29/2015                         UPSLOG(8)
Impressum