~iheino+ub/+junk/nut-upsconf-docfix

« back to all changes in this revision

Viewing changes to docs/man/upslog.txt

  • Committer: Tuomas Heino
  • Author(s): Laurent Bigonville
  • Date: 2014-04-22 20:46:12 UTC
  • Revision ID: iheino+ub@cc.hut.fi-20140422204612-1x2gh3nkezfsdao4
Tags: upstream-2.7.2
ImportĀ upstreamĀ versionĀ 2.7.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
UPSLOG(8)
 
2
=========
 
3
 
 
4
NAME
 
5
----
 
6
 
 
7
upslog - UPS status logger
 
8
 
 
9
SYNOPSIS
 
10
--------
 
11
 
 
12
*upslog -h*
 
13
 
 
14
*upslog* ['OPTIONS']
 
15
 
 
16
DESCRIPTION
 
17
-----------
 
18
 
 
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.
 
21
 
 
22
The default format string includes variables that are supported by many
 
23
common UPS models.  See the description below to make your own.
 
24
 
 
25
OPTIONS
 
26
-------
 
27
 
 
28
*-h*::
 
29
Display the help message.
 
30
 
 
31
*-f* 'format'::
 
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:
 
35
 
 
36
%%;; Insert a single "%"
 
37
 
 
38
%TIME format%;; Insert the time with strftime formatting
 
39
 
 
40
%ETIME%;; Insert the number of seconds, ala time_t.  This is now a 
 
41
10 digit number.
 
42
 
 
43
%HOST%;; insert the local hostname
 
44
 
 
45
%UPSHOST%;; insert the host of the UPS being monitored
 
46
 
 
47
%PID%;; insert the pid of upslog
 
48
 
 
49
%VAR varname%;; 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
 
 
59
Wait this many seconds between polls.  This defaults to 30 seconds.
 
60
+
 
61
If you require tighter timing, you should write your own logger using
 
62
the linkman:upsclient[3] library.
 
63
 
 
64
*-l* 'logfile'::
 
65
 
 
66
Store the results in this file.
 
67
+
 
68
You can use "-" for stdout, but upslog will remain in the foreground.
 
69
 
 
70
*-s* 'ups'::
 
71
Monitor this UPS.  The format for this option is  
 
72
+upsname[@hostname[:port]]+.  The default hostname is "localhost".
 
73
 
 
74
*-u* 'username'::
 
75
 
 
76
If started as root, upsmon will *setuid*(2) to the user id
 
77
associated with 'username' for security.  
 
78
+
 
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.
 
81
 
 
82
SERVICE DELAYS
 
83
--------------
 
84
 
 
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.
 
88
 
 
89
LOG ROTATION
 
90
------------
 
91
 
 
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.
 
95
 
 
96
SEE ALSO
 
97
--------
 
98
 
 
99
Server:
 
100
~~~~~~~
 
101
linkman:upsd[8]
 
102
 
 
103
Clients:
 
104
~~~~~~~~
 
105
linkman:upsc[8], linkman:upscmd[8],
 
106
linkman:upsrw[8], linkman:upsmon[8]
 
107
 
 
108
Internet resources:
 
109
~~~~~~~~~~~~~~~~~~~
 
110
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/