1UPS.CONF(5) NUT Manual UPS.CONF(5)
2
3
4
6 ups.conf - UPS definitions for Network UPS Tools
7
9 This file is read by the driver controller upsdrvctl(8), the UPS
10 drivers that use the common core (see nutupsdrv(8), and upsd(8)). The
11 file begins with global directives, and then each UPS has a section
12 which contains a number of directives that set parameters for that UPS.
13
14 A UPS section begins with the name of the UPS in brackets, and
15 continues until the next UPS name in brackets or until EOF. The name
16 "default" is used internally in upsd, so you can’t use it in this file.
17
18 You must define the driver and port elements for each entry. Anything
19 after that in a section is optional. A simple example might look like
20 this:
21
22 [myups]
23 driver = blazer_ser
24 port = /dev/ttyS0
25 desc = "Web server UPS"
26
27 A slightly more complicated version includes some extras for the
28 hardware-specific part of the driver:
29
30 [bigups]
31 driver = apcsmart
32 port = /dev/cua00
33 cable = 940-0095B
34 sdtype = 2
35 desc = "Database server UPS"
36
37 In this case, the apcsmart(8) driver will receive variables called
38 "cable" and "sdtype" which have special meanings. See the man pages of
39 your driver(s) to learn which variables are supported and what they do.
40
42 chroot
43 Optional. The driver will chroot(2) to this directory during
44 initialization. This can be useful when securing systems.
45
46 driverpath
47 Optional. Path name of the directory in which the UPS driver
48 executables reside. If you don’t specify this, the programs look in
49 a built-in default directory, which is often /usr/local/ups/bin.
50
51 maxstartdelay
52 Optional. Same as the UPS field of the same name, but this is the
53 default for UPSes that don’t have the field.
54
55 pollinterval
56 Optional. The status of the UPS will be refreshed after a maximum
57 delay which is controlled by this setting. This is normally 2
58 seconds. This may be useful if the driver is creating too much of a
59 load on your system or network.
60
61 user
62 Optional. If started as root, the driver will setuid(2) to the user
63 id associated with username.
64
66 driver
67 Required. This specifies which program will be monitoring this UPS.
68 You need to specify the one that is compatible with your hardware.
69 See nutupsdrv(8) for more information on drivers in general and
70 pointers to the man pages of specific drivers.
71
72 port
73 Required. This is the serial port where the UPS is connected. On a
74 Linux system, the first serial port usually is /dev/ttyS0. On
75 FreeBSD and similar systems, it probably will be /dev/cuaa0.
76
77 sdorder
78 Optional. When you have multiple UPSes on your system, you usually
79 need to turn them off in a certain order. upsdrvctl shuts down all
80 the 0s, then the 1s, 2s, and so on. To exclude a UPS from the
81 shutdown sequence, set this to -1.
82
83 The default value for this parameter is 0.
84
85 desc
86 Optional. This allows you to set a brief description that upsd will
87 provide to clients that ask for a list of connected equipment.
88
89 nolock
90 Optional. When you specify this, the driver skips the port locking
91 routines every time it starts. This may allow other processes to
92 seize the port if you start more than one accidentally.
93
94 You should only use this if your system won’t work without it.
95
96 This may be needed on Mac OS X systems.
97
98 ignorelb
99 Optional. When you specify this, the driver ignores a low battery
100 condition flag that is reported by the UPS (some devices will
101 switch off almost immediately after setting this flag, or will
102 report this as soons as the mains fails). Instead it will use
103 either of the following conditions to determine when the battery is
104 low:
105
106 battery.charge < battery.charge.low
107 battery.runtime < battery.runtime.low
108
109 The idea is to set the battery.charge.low and/or
110 battery.runtime.low levels in ups.conf to a value that gives enough
111 time to cleanly shutdown your system:
112
113 override.battery.charge.low = 30
114 override.battery.runtime.low = 180
115
116 In order for this to work, your UPS should be able to (reliably)
117 report charge and/or runtime remaining on battery. Use with
118 caution!
119
120 maxstartdelay
121 Optional. This can be set as a global variable above your first UPS
122 definition and it can also be set in a UPS section. This value
123 controls how long upsdrvctl will wait for the driver to finish
124 starting. This keeps your system from getting stuck due to a broken
125 driver or UPS.
126
127 The default is 45 seconds.
128
129 default.<variable>
130 Optional. Set a default value for <variable> which is used in case
131 the UPS doesn’t provide a value, but will be overwritten if a value
132 is available from the UPS:
133
134 default.input.voltage.nominal = 230
135
136 The above will report the nominal input voltage to be 230, unless
137 the UPS tells us differently.
138
139 override.<variable>
140 Optional. Set a value for <value> that overrides any value that may
141 be read from the UPS. Used for overriding values from the UPS that
142 are clearly wrong (some devices report wrong values for battery
143 voltage for instance):
144
145 override.battery.voltage.nominal = 12
146
147 Use with caution! This will only change the appearance of the
148 variable to the outside world, internally in the UPS the original
149 value is used.
150
151 All other fields are passed through to the hardware-specific part of
152 the driver. See those manuals for the list of what is allowed.
153
155 upsdrvctl(8) uses this file to start and stop the drivers.
156
157 The drivers themselves also obtain configuration data from this file.
158 Each driver looks up its section and uses that to configure itself.
159
160 upsd(8) learns about which UPSes are installed on this system by
161 reading this file. If this system is called "doghouse" and you have
162 defined a UPS in your ups.conf called "snoopy", then you can monitor it
163 from upsc(8) or similar as "snoopy@doghouse".
164
166 upsd(8), nutupsdrv(8), upsdrvctl(8)
167
168 Internet resources
169 The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
170
171
172
173Network UPS Tools 09/15/2011 UPS.CONF(5)