root/lm-sensors/branches/lm-sensors-3.0.0/lib/sensors.conf.5 @ 4465

Revision 4465, 10.6 KB (checked in by khali, 6 years ago)

Delete all remnants of algorithm names.

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