1 .\" $NetBSD: envsys.conf.5,v 1.11 2008/09/23 21:50:41 reed Exp $
4 .\" Copyright (c) 2007, 2008 Juan Romero Pardines.
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 .Nd Configuration file for the envsys framework
37 .Op Fl c Ar /etc/envsys.conf
41 file configures all the features provided by the
44 It consists of a series of device and sensor blocks.
45 Each sensor block defines a group of
47 The file format is free-form: new line markers and indentation are
51 sign and extend until the end of line.
55 is like a variable assignment.
56 It has a name, which goes to the left of the equal sign, and a value,
57 which goes to the right.
58 The assignment ends with a semicolon.
63 There is no difference between string or integer values when defining them.
64 The value must be surrounded by double quotes if it contains whitespace.
66 There can be multiple groups of devices and multiple groups of sensors
67 in the configuration file.
69 A device block consists of one or more sensor blocks and one or more global
71 It has the following syntax:
72 .Bd -literal -offset indent
89 Device names are those shown by the
91 command; sensor blocks are named by the index position in which they are shown.
93 For example, if we have the following output from the
96 .Bd -literal -offset indent
97 CPU Temperature: 32.000 degC
98 MB Temperature: 37.000 degC
99 Vcore Voltage: 1.232 V
100 +3.3 Voltage: 3.248 V
102 +12 Voltage: 11.985 V
103 CPU FAN Speed: 1250 RPM
115 There is another way that will give you the correct index
118 command will print the raw XML property list.
119 You only have to find the
121 object in the appropriate dictionary.
122 The object will be shown as:
123 .Bd -literal -offset indent
124 \*[Lt]key\*[Gt]index\*[Lt]/key\*[Gt]
125 \*[Lt]string\*[Gt]sensor2\*[Lt]/string\*[Gt]
128 Invalid sensors and devices will be detected by the
130 parser and will be reported as errors.
132 The following properties are provided for sensor blocks (please note that
133 not all properties apply to all type of sensors):
134 .Bl -tag -width ident
135 .It critical-capacity = 10;
137 Sets a critical capacity limit property of 10
138 percent in a battery sensor.
139 Battery sensors are those that report a percentage from the
143 It is possible to find out if the sensor accepts this property
152 .Bd -literal -offset indent
153 \*[Lt]key\*[Gt]want-percentage\*[Lt]/key\*[Gt]
157 Only a value between 0 and 100 is allowed.
158 When the limit is reached in the sensor, a
160 event will be sent to the
162 daemon (if running) and will execute the block for this event in
163 .Pa /etc/powerd/scripts/sensor_battery .
165 If this property is set, its value will be shown in the
167 display output with a column named
169 .It warning-capacity = 20;
171 Sets a warning capacity limit property of 20
172 percent in a battery sensor.
173 Battery sensors are those that report a percentage from the
177 It is possible to find out if the sensor accepts this property
186 .Bd -literal -offset indent
187 \*[Lt]key\*[Gt]want-percentage\*[Lt]/key\*[Gt]
191 Only a value between 0 and 100 is allowed.
192 When the limit is reached in the sensor, a
193 .Em user-warn-capacity
194 event will be sent to the
196 daemon (if running) and will execute the block for this event in
197 .Pa /etc/powerd/scripts/sensor_battery .
199 If this property is set, its value will be shown in the
201 display output with a column named
206 .It critical-max = 70C;
208 Sets a critical maximum limit property in a sensor.
209 Note that in this example, we are specifying the
211 keyword at the end; that means that this will only be valid for
213 sensors and that the value is specified as degrees
215 If degrees Fahrenheit are wanted, just change use the letter
218 .Bd -literal -offset indent
222 To know sensor type, you have to look at the
224 object in the XML property list.
225 Remember: the XML property list has
226 all the information that the application uses to print the values!
228 Other sensors that are not of
230 type must not include the final character for the unit.
231 A dot is allowed in the value, if it corresponds to the
232 range that the sensor is reporting.
233 When the limit has been reached in the sensor, a
235 event will be sent to the
237 daemon (if running) and will execute the block for this event in
239 .Pa /etc/powerd/scripts/sensor_foo
240 script (depending on the sensor's type).
242 Please note that this property cannot be set in battery sensors
245 object in their dictionary).
246 This rule applies for the
253 If this property is set, its value will be shown in the
255 display output with a column named
260 .It critical-min = 1.230;
262 Sets a critical minimum limit property in a sensor.
270 When the limit has been reached in the sensor, a
272 event will be sent to the
274 daemon (if running) and will execute the block for this event in
276 .Pa /etc/powerd/scripts/sensor_foo
277 script (depending on the sensor's type).
279 If this property is set, its value will be shown in the
281 display output with a column named
283 .It warning-max = 70C;
285 Sets a warning maximum limit property in a sensor.
293 When the limit has been reached in the sensor, a
295 event will be sent to the
297 daemon (if running) and will execute the block for this event in
299 .Pa /etc/powerd/scripts/sensor_foo
300 script (depending on the sensor's type).
302 Please note that this property cannot be set in battery sensors
305 object in their dictionary).
306 This rule applies for the
310 If this property is set, its value will be shown in the
312 display output with a column named
317 .It warning-min = 1.230;
319 Sets a critical minimum limit property in a sensor.
327 When the limit has been reached in the sensor, a
329 event will be sent to the
331 daemon (if running) and will execute the block for this event in
333 .Pa /etc/powerd/scripts/sensor_foo
334 script (depending on the sensor's type).
336 If this property is set, its value will be shown in the
338 display output with a column named
343 .It description = string
345 Sets a new description in a sensor.
346 You can set this property in
347 all sensors, except that you won't be able to set a description
348 that is currently used for the specified device.
351 Sets a new resistor factor property in a sensor.
352 This property is only allowed in
356 if the driver has enabled the appropriate flag for the mentioned
358 The resistor factor may be used to change the behavior
359 of the value returned by the driver.
361 If a sensor supports this, the
363 object appears enabled (true) in the dictionary.
366 The following properties are available for device blocks:
367 .Bl -tag -width ident
368 .It refresh-timeout = 10s
370 This property sets the refresh timeout value in a driver, and will be used
371 to refresh data and check for critical conditions any time the timeout
373 The value may be specified in seconds, minutes or hours.
374 To specify the value in seconds, the
376 character must be appended last, if minutes is desired, a
388 .Bl -tag -width /etc/envsys.conf -compact
389 .It Pa /etc/envsys.conf
390 Default configuration file.
399 configuration file first appeared in