root/lm-sensors/tags/V3-0-1/lib/sensors.conf.5

Revision 4990, 10.5 kB (checked in by khali, 1 year ago)

Use /etc/sensors3.conf as the default configuration file. If it can't
be found, fallback to /etc/sensors.conf. This allows for an old
libsensors and a new libsensors to be installed in parallel, and each
one has its own configuration file.

One important change here is that the default configuration file will
be installed as /etc/sensors3.conf by "make install".

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 .\" Copyright 1998, 1999 Adrian Baugh <adrian.baugh@keble.ox.ac.uk> and
2 .\" Frodo Looijaard <frodol@dds.nl>
3 .\"
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\"
24 .\" References consulted:
25 .\"     sensors.conf.eg by Frodo Looijaard
26 .TH sensors.conf 5  "October 2007" "lm-sensors 3" "Linux User's Manual"
27 .SH NAME
28 sensors.conf \- libsensors configuration file
29
30 .SH DESCRIPTION
31 sensors.conf describes how libsensors, and so all programs using it, should
32 translate the raw readings from the kernel modules to real\-world values.
33
34 .SH SYNTAX
35 Comments are introduces by hash marks. A comment continues to the end of the
36 line. Empty lines, and lines containing only whitespace or comments are
37 ignored.  Other lines have one of the below forms. There must be whitespace
38 between each element, but the amount of whitespace is unimportant. A line
39 may be continued on the next line by ending it with a backslash; this does
40 not work within a comment,
41 .B NAME
42 or
43 .BR NUMBER .
44
45 .RS
46 bus
47 .B NAME NAME NAME
48 .sp 0
49 chip
50 .B NAME\-LIST
51 .sp 0
52 label
53 .B NAME NAME
54 .sp 0
55 compute
56 .B NAME EXPR
57 ,
58 .B EXPR
59 .sp 0
60 ignore
61 .B NAME
62 .sp 0
63 set
64 .B NAME EXPR
65 .RE
66 .sp
67 A
68 .B NAME
69 is a string. If it only contains letters, digits and underscores, it does not
70 have to quoted; in all other cases, you should use double quotes around it.
71 Within quotes, you can use the normal escape\-codes from C.
72
73 A
74 .B NAME\-LIST
75 is one or more
76 .B NAME
77 items behind each other, separated by whitespace.
78
79 A
80 .B EXPR
81 is of one of the below forms:
82
83 .RS
84 .B NUMBER
85 .sp 0
86 .B NAME
87 .sp 0
88 @
89 .sp 0
90 .B EXPR
91 +
92 .B EXPR
93 .sp 0
94 .B EXPR
95 \-
96 .B EXPR
97 .sp 0
98 .B EXPR
99 *
100 .B EXPR
101 .sp 0
102 .B EXPR
103 /
104 .B EXPR
105 .sp 0
106 \-
107 .B EXPR
108 .sp 0
109 (
110 .B EXPR
111 )
112 .RE
113
114 A
115 .B NUMBER
116 is a floating\-point number. `10', `10.4' and `.4' are examples of valid
117 floating\-point numbers; `10.' or `10E4' are not valid.
118
119 .SH SEMANTICS
120
121 This section describes the meaning of each statement. Each statement is
122 accompanied by an example line. Please ignore line wrap\-arounds.
123
124 .SS BUS STATEMENT
125
126 .RS
127 bus "i2c\-0" "SMBus PIIX4 adapter at e800"
128 .RE
129
130 A
131 .I bus
132 statement binds the description of an I2C or SMBus adapter to a bus number.
133 This makes it possible to refer to an adapter in the configuration file,
134 independent of the actual correspondence of bus numbers and actual
135 adapters (which may change from moment to moment).
136
137 The first argument is the bus number. It is the literal text
138 .IR i2c\- ,
139 followed by a number. As there is a dash in this argument, it must
140 always be quoted.
141
142 The second argument is the adapter name, it must match exactly the
143 adapter name as it appears in
144 .IR /sys/class/i2c-adapter/i2c-*/name .
145 It should always be quoted as well as it will most certainly contain
146 spaces or dashes.
147
148 The
149 .I bus
150 statements may be scattered randomly throughout the configuration file;
151 there is no need to place the bus line before the place where its binding
152 is referred to. Still, as a matter of good style, we suggest you place
153 all
154 .I bus
155 statements together at the top of your configuration file.
156
157 Running
158 .B sensors --bus-list
159 will generate these lines for you.
160
161 .SS CHIP STATEMENT
162
163 .RS
164 chip "lm78\-*" "lm79\-*"
165 .RE
166
167 The
168 .I chip
169 statement selects for which chips all following configuration
170 statements are meant. The chip selection remains valid until the next
171 .I chip
172 statement. It does not influence the operation of a
173 .I bus
174 statement.
175
176 If a chip matches at least one of the chip descriptions, all following
177 configuration lines are examined for it. If it matches none of the
178 chip descriptions, every
179 .RI non\- bus
180 statement is ignored upto the next
181 .I chip
182 statement.
183
184 A chip description is built from a couple of elements, separated by
185 dashes.
186
187 The first element is the name of the chip type. Sometimes a single driver
188 implements several chip types, with several names. The driver documentation
189 should tell you. You may substitute the wildcard operator
190 .I *
191 for this element.
192
193 The second element is the name of the bus. This is either
194 .IR isa ,
195 .I pci
196 or
197 .IR i2c-N ,
198 with
199 .I N
200 being any number as binded with a
201 .I bus
202 statement. You may substitute the wildcard operator
203 .I *
204 for this element, or only for the number of the I2C bus
205 (which means 'any I2C bus').
206
207 The third element is the hexadecimal address of the chip. The valid range
208 depends on the bus type. You may substitute
209 the wildcard operator
210 .I *
211 for this element.
212
213 Note that it wouldn't make any sense to specify the address without the
214 bus type. For this reason, the address part is plain omitted when the bus
215 type isn't specified.
216 The following are all valid chip type specification based on
217 .I lm78\-i2c\-1\-2d
218 or
219 .IR lm78\-isa\-0290 :
220
221 .RS
222 lm78\-i2c\-1\-2d
223 .sp 0
224 lm78\-i2c\-1\-*
225 .sp 0
226 lm78\-i2c\-*\-2d
227 .sp 0
228 lm78\-i2c\-*\-*
229 .sp 0
230 lm78\-isa\-0290
231 .sp 0
232 lm78\-isa\-*   
233 .sp 0
234 lm78\-*       
235 .sp 0
236 *\-i2c\-1\-2d
237 .sp 0
238 *\-i2c\-1\-*
239 .sp 0
240 *\-i2c\-*\-2d
241 .sp 0
242 *\-i2c-*\-*
243 .sp 0
244 *\-isa\-0290
245 .sp 0
246 *\-isa\-*
247 .RE
248
249 .SS COMPUTE STATEMENT
250 .RS
251 compute in3 ((6.8/10)+1)*@ ,  @/((6.8/10)+1)
252 .RE
253
254 The
255 .I compute
256 statement describes how you should translate a feature's raw value to a
257 real\-world value, and how you should translate it back to a raw value again.
258
259 The first argument is the feature name, which may be the name of a feature
260 class (see below). The second is an expression which specifies how a
261 raw value must be translated to a real\-world value; `@' stands here for
262 the raw value. The third is an expression that specifies how a real\-world
263 value should be translated back to a raw value; `@' stands here for the
264 real\-world value.
265
266 You may use the name of other features in these expressions; you should be
267 careful though to avoid circular references, as this may hang the expression
268 evaluator.
269
270 If at any moment a translation between a raw and a real\-world value is
271 called for, but no
272 .I compute
273 statement applies, a one\-on\-one translation is used instead.
274
275 The comma is an unfortunate necessity to stop the statement from becoming
276 ambiguous.
277
278 .SS IGNORE STATEMENT
279 .RS
280 ignore fan1
281 .RE
282
283 The
284 .I ignore
285 statement is a hint that a specific feature should be ignored - probably
286 because it returns bogus values (for example, because a fan or temperature
287 sensor is not connected).
288
289 The only argument is the feature name, which may be a feature class;
290 in that case the label class is used (see below).
291
292 .SS LABEL STATEMENT
293 .RS
294 label in3 "+5V"
295 .RE
296
297 The
298 .I label
299 statement describes how a feature should be called. Features without a
300 .I label
301 statement are just called by their feature name. Applications can use this
302 to label the readings they present (but they don't have to).
303
304 The first argument is the feature name, which may be a feature class (see
305 below). The second argument is the feature description.
306
307 .SS SET STATEMENT
308 .RS
309 set in3_min  5 * 0.95
310 .RE
311
312 The
313 .I set
314 statement gives an initial value for a feature. Not each feature can be
315 given a sensible initial value; valid features are usually min/max limits.
316
317 The first argument is the feature name. The second argument is an expression
318 which determines the initial value. If there is an applying
319 .I compute
320 statement, this value is fed to its third argument to translate it to a
321 raw value.
322
323 You may use the name of other features in these expressions; current readings
324 are substituted. You should be careful though to avoid circular references,
325 as this may hang the expression evaluator. Also, you can't be sure in which
326 order
327 .I set
328 statements are evaluated, so this can lead to nasty surprises.
329
330 .SH FEATURE CLASSES
331
332 There are two kinds of classes, here called
333 .I compute
334 and
335 .I label
336 classes, after the statements for which they are defined. Classes are
337 defined over features: the kind of values that can be read from or set
338 for a specific kind of chip.
339
340 Each class has a class name, which is usually the same as its most
341 prominent feature. A
342 .I label
343 or
344 .I compute
345 statement for the class name feature forces the same settings for all other
346 class members. A specific statement for a class member feature always
347 overrides the general class setting, though. This means that you can't
348 override the class name feature explicitly.
349
350 A simple example will explain this better. The
351 .I fan1
352 label class of the
353 .I lm78
354 chip contains three members:
355 .I fan1
356 itself,
357 .I fan1_min
358 and
359 .IR fan1_div .
360 The last feature sets the number by which readings are divided (to give the
361 fan less resolution, but a larger field of operation). The following
362 line will set the name of all these features to describe the fan:
363 .RS
364 label fan1 "Processor 1 FAN"
365 .RE
366 Now we happen to know that, due to the type of fan we use, all readings
367 are always off by a factor of two (some fans only return one 'tick' each
368 rotation, others return two):
369 .RS
370 compute fan1 @/2 , @*2
371 .RE
372 It will be clear that this should be done for the
373 .I fan1_min
374 feature too, but not for the
375 .I fan1_div
376 feature! Fortunately, the
377 .I fan1
378 compute class contains
379 .IR fan1_min ,
380 but not
381 .IR fan1_div ,
382 so this works out right.
383
384 .SH WHICH STATEMENT APPLIES
385
386 If more than one statement of the same kind applies at a certain moment,
387 the last one in the configuration file is used. So usually, you should
388 put more genereal
389 .I chip
390 statements at the top, so you can overrule them below.
391
392 There is one exception to this rule: if a statement only applies because
393 the feature is in the same class as the feature the statement contains,
394 and there is anywhere else a statement for this specific class member,
395 that one takes always precedence.
396
397 .SH FILES
398 .I /etc/sensors3.conf
399 .br
400 .I /etc/sensors.conf
401 .RS
402 The system-wide
403 .BR libsensors (3)
404 configuration file. /etc/sensors3.conf is tried first, and if it doesn't exist,
405 /etc/sensors.conf is used instead.
406
407 .SH SEE ALSO
408 libsensors(3)
409
410 .SH AUTHOR
411 Frodo Looijaard and the lm_sensors group
412 http://www.lm-sensors.org/
413
414
415
Note: See TracBrowser for help on using the browser.