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

Revision 5340, 10.5 KB (checked in by khali, 5 years ago)

Typo fix.

  • 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
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 introduced 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.IR /sys/class/i2c-adapter/i2c-*/name .
145It should always be quoted as well as it will most certainly contain
146spaces or dashes.
147
148The
149.I bus
150statements may be scattered randomly throughout the configuration file;
151there is no need to place the bus line before the place where its binding
152is referred to. Still, as a matter of good style, we suggest you place
153all
154.I bus
155statements together at the top of your configuration file.
156
157Running
158.B sensors --bus-list
159will generate these lines for you.
160
161.SS CHIP STATEMENT
162
163.RS
164chip "lm78\-*" "lm79\-*"
165.RE
166
167The
168.I chip
169statement selects for which chips all following configuration
170statements are meant. The chip selection remains valid until the next
171.I chip
172statement. It does not influence the operation of a
173.I bus
174statement.
175
176If a chip matches at least one of the chip descriptions, all following
177configuration lines are examined for it. If it matches none of the
178chip descriptions, every
179.RI non\- bus
180statement is ignored upto the next
181.I chip
182statement.
183
184A chip description is built from a couple of elements, separated by
185dashes.
186
187The first element is the name of the chip type. Sometimes a single driver
188implements several chip types, with several names. The driver documentation
189should tell you. You may substitute the wildcard operator
190.I *
191for this element.
192
193The second element is the name of the bus. This is either
194.IR isa ,
195.I pci
196or
197.IR i2c-N ,
198with
199.I N
200being any number as binded with a
201.I bus
202statement. You may substitute the wildcard operator
203.I *
204for this element, or only for the number of the I2C bus
205(which means 'any I2C bus').
206
207The third element is the hexadecimal address of the chip. The valid range
208depends on the bus type. You may substitute
209the wildcard operator
210.I *
211for this element.
212
213Note that it wouldn't make any sense to specify the address without the
214bus type. For this reason, the address part is plain omitted when the bus
215type isn't specified.
216The following are all valid chip type specification based on
217.I lm78\-i2c\-1\-2d
218or
219.IR lm78\-isa\-0290 :
220
221.RS
222lm78\-i2c\-1\-2d
223.sp 0
224lm78\-i2c\-1\-*
225.sp 0
226lm78\-i2c\-*\-2d
227.sp 0
228lm78\-i2c\-*\-*
229.sp 0
230lm78\-isa\-0290
231.sp 0
232lm78\-isa\-*   
233.sp 0
234lm78\-*       
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
251compute in3 ((6.8/10)+1)*@ ,  @/((6.8/10)+1)
252.RE
253
254The
255.I compute
256statement describes how you should translate a feature's raw value to a
257real\-world value, and how you should translate it back to a raw value again.
258
259The first argument is the feature name, which may be the name of a feature
260class (see below). The second is an expression which specifies how a
261raw value must be translated to a real\-world value; `@' stands here for
262the raw value. The third is an expression that specifies how a real\-world
263value should be translated back to a raw value; `@' stands here for the
264real\-world value.
265
266You may use the name of other features in these expressions; you should be
267careful though to avoid circular references, as this may hang the expression
268evaluator.
269
270If at any moment a translation between a raw and a real\-world value is
271called for, but no
272.I compute
273statement applies, a one\-on\-one translation is used instead.
274
275The comma is an unfortunate necessity to stop the statement from becoming
276ambiguous.
277
278.SS IGNORE STATEMENT
279.RS
280ignore fan1
281.RE
282
283The
284.I ignore
285statement is a hint that a specific feature should be ignored - probably
286because it returns bogus values (for example, because a fan or temperature
287sensor is not connected).
288
289The only argument is the feature name, which may be a feature class;
290in that case the label class is used (see below).
291
292.SS LABEL STATEMENT
293.RS
294label in3 "+5V"
295.RE
296
297The
298.I label
299statement describes how a feature should be called. Features without a
300.I label
301statement are just called by their feature name. Applications can use this
302to label the readings they present (but they don't have to).
303
304The first argument is the feature name, which may be a feature class (see
305below). The second argument is the feature description.
306
307.SS SET STATEMENT
308.RS
309set in3_min  5 * 0.95
310.RE
311
312The
313.I set
314statement gives an initial value for a feature. Not each feature can be
315given a sensible initial value; valid features are usually min/max limits.
316
317The first argument is the feature name. The second argument is an expression
318which determines the initial value. If there is an applying
319.I compute
320statement, this value is fed to its third argument to translate it to a
321raw value.
322
323You may use the name of other features in these expressions; current readings
324are substituted. You should be careful though to avoid circular references,
325as this may hang the expression evaluator. Also, you can't be sure in which
326order
327.I set
328statements are evaluated, so this can lead to nasty surprises.
329
330.SH FEATURE CLASSES
331
332There are two kinds of classes, here called
333.I compute
334and
335.I label
336classes, after the statements for which they are defined. Classes are
337defined over features: the kind of values that can be read from or set
338for a specific kind of chip.
339
340Each class has a class name, which is usually the same as its most
341prominent feature. A
342.I label
343or
344.I compute
345statement for the class name feature forces the same settings for all other
346class members. A specific statement for a class member feature always
347overrides the general class setting, though. This means that you can't
348override the class name feature explicitly.
349
350A simple example will explain this better. The
351.I fan1
352label class of the
353.I lm78
354chip contains three members:
355.I fan1
356itself,
357.I fan1_min
358and
359.IR fan1_div .
360The last feature sets the number by which readings are divided (to give the
361fan less resolution, but a larger field of operation). The following
362line will set the name of all these features to describe the fan:
363.RS
364label fan1 "Processor 1 FAN"
365.RE
366Now we happen to know that, due to the type of fan we use, all readings
367are always off by a factor of two (some fans only return one 'tick' each
368rotation, others return two):
369.RS
370compute fan1 @/2 , @*2
371.RE
372It will be clear that this should be done for the
373.I fan1_min
374feature too, but not for the
375.I fan1_div
376feature! Fortunately, the
377.I fan1
378compute class contains
379.IR fan1_min ,
380but not
381.IR fan1_div ,
382so this works out right.
383
384.SH WHICH STATEMENT APPLIES
385
386If more than one statement of the same kind applies at a certain moment,
387the last one in the configuration file is used. So usually, you should
388put more general
389.I chip
390statements at the top, so you can overrule them below.
391
392There is one exception to this rule: if a statement only applies because
393the feature is in the same class as the feature the statement contains,
394and there is anywhere else a statement for this specific class member,
395that one takes always precedence.
396
397.SH FILES
398.I /etc/sensors3.conf
399.br
400.I /etc/sensors.conf
401.RS
402The system-wide
403.BR libsensors (3)
404configuration 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
408libsensors(3)
409
410.SH AUTHOR
411Frodo Looijaard and the lm_sensors group
412http://www.lm-sensors.org/
413
414
415
Note: See TracBrowser for help on using the browser.