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

Revision 5536, 15.8 KB (checked in by khali, 6 years ago)

Spelling fixes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1.\" Copyright (C) 1998, 1999 Adrian Baugh <adrian.baugh@keble.ox.ac.uk> and
2.\"                          Frodo Looijaard <frodol@dds.nl>
3.\" Copyright (C) 2008       Jean Delvare <khali@linux-fr.org>
4.\"
5.\" Permission is granted to make and distribute verbatim copies of this
6.\" manual provided the copyright notice and this permission notice are
7.\" preserved on all copies.
8.\"
9.\" Permission is granted to copy and distribute modified versions of this
10.\" manual under the conditions for verbatim copying, provided that the
11.\" entire resulting derived work is distributed under the terms of a
12.\" permission notice identical to this one.
13.\"
14.\" Since the Linux kernel and libraries are constantly changing, this
15.\" manual page may be incorrect or out-of-date.  The author(s) assume no
16.\" responsibility for errors or omissions, or for damages resulting from
17.\" the use of the information contained herein.
18.\"
19.\" Formatted or processed versions of this manual, if unaccompanied by
20.\" the source, must acknowledge the copyright and authors of this work.
21.\"
22.\" References consulted:
23.\"     sensors.conf.eg by Frodo Looijaard
24.TH sensors.conf 5  "December 2008" "lm-sensors 3" "Linux User's Manual"
25.SH NAME
26sensors.conf \- libsensors configuration file
27
28.SH DESCRIPTION
29sensors.conf describes how libsensors, and so all programs using it, should
30translate the raw readings from the kernel modules to real\-world values.
31
32.SH SEMANTICS
33
34On a given system, there may be one or more hardware monitoring chips.
35Each chip may have several features. For example, the LM78 monitors 7
36voltage inputs, 3 fans and one temperature. Feature names are
37standardized. Typical feature names are in0, in1, in2... for voltage
38inputs, fan1, fan2, fan3... for fans and temp1, temp2, temp3... for
39temperature inputs.
40
41Each feature may in turn have one or more sub\-features, each
42representing an attribute of the feature: input value, low limit, high
43limit, alarm, etc. Sub\-feature names are standardized as well. For
44example, the first voltage input (in0) would typically have
45sub\-features in0_input (measured value), in0_min (low limit), in0_max
46(high limit) and in0_alarm (alarm flag). Which sub\-features are
47actually present depend on the exact chip type.
48
49The
50.I sensors.conf
51configuration file will let you configure each chip, feature and
52sub\-feature in a way that makes sense for your system.
53
54The rest of this section describes the meaning of each configuration
55statement.
56
57.SS CHIP STATEMENT
58
59A
60.I chip
61statement selects for which chips all following
62.IR compute ,
63.IR label ,
64.I ignore
65and
66.I set
67statements are meant. A chip
68selection remains valid until the next
69.I chip
70statement. Example:
71
72.RS
73chip "lm78\-*" "lm79\-*"
74.RE
75
76If a chip matches at least one of the chip descriptions, the following
77configuration lines are examined for it, otherwise they are ignored.
78
79A chip description is built from several elements, separated by
80dashes. The first element is the chip type, the second element is
81the name of the bus, and the third element is the hexadecimal address
82of the chip. Such chip descriptions are printed by sensors(1) as the
83first line for every chip.
84
85The name of the bus is either
86.IR isa ,
87.IR pci ,
88.IR virtual ,
89.I spi-*
90or
91.I i2c-N
92with
93.I N
94being a bus number as bound with a
95.I bus
96statement. This list isn't necessarily exhaustive as support for other
97bus types may be added in the future.
98
99You may substitute the wildcard operator
100.I *
101for every element. Note however that it wouldn't make any sense to specify
102the address without the bus type, so the address part is plain omitted
103when the bus type isn't specified.
104Here is how you would express the following matches:
105
106.TS
107l l.
108LM78 chip at address 0x2d on I2C bus 1  lm78\-i2c\-1\-2d
109LM78 chip at address 0x2d on any I2C bus        lm78\-i2c\-*\-2d
110LM78 chip at address 0x290 on the ISA bus       lm78\-isa\-0290
111Any LM78 chip on I2C bus 1      lm78\-i2c\-1\-*
112Any LM78 on any I2C bus lm78\-i2c\-*\-*
113Any LM78 chip on the ISA bus    lm78\-isa\-*
114Any LM78 chip   lm78\-*
115Any chip at address 0x2d on I2C bus 1   *\-i2c\-1\-2d
116Any chip at address 0x290 on the ISA bus        *\-isa\-0290
117.TE
118
119If several chip statements match a specific chip, they are all considered.
120
121.SS LABEL STATEMENT
122
123A
124.I label
125statement describes how a feature should be called. Features without a
126.I label
127statement are just called by their feature name. Applications can use this
128to label the readings they present. Example:
129
130.RS
131label in3 "+5V"
132.RE
133
134The first argument is the feature name. The second argument is the feature
135description.
136
137.SS IGNORE STATEMENT
138
139An
140.I ignore
141statement is a hint that a specific feature should be ignored - probably
142because it returns bogus values (for example, because a fan or temperature
143sensor is not connected). Example:
144
145.RS
146ignore fan1
147.RE
148
149The only argument is the feature name. Please note that this does not disable
150anything in the actual sensor chip; it simply hides the feature in question
151from libsensors users.
152
153.SS COMPUTE STATEMENT
154
155A
156.I compute
157statement describes how a feature's raw value should be translated to a
158real\-world value, and how a real\-world value should be translated back
159to a raw value again. This is most useful for voltage sensors, because
160in general sensor chips have a limited range and voltages outside this
161range must be divided (using resistors) before they can be monitored.
162Example:
163
164.RS
165compute in3 ((6.8/10)+1)*@, @/((6.8/10)+1)
166.RE
167
168The example above expresses the fact that the voltage input is divided
169using two resistors of values 6.8 Ohm and 10 Ohm, respectively. See the
170.B VOLTAGE COMPUTATION DETAILS
171section below for details.
172
173The first argument is the feature name. The second argument is an expression
174which specifies how a raw value must be translated to a real\-world value;
175`@' stands here for the raw value. This is the formula which will be applied
176when reading values from the chip. The third argument is an expression that
177specifies how a real\-world value should be translated back to a raw value;
178`@' stands here for the real\-world value. This is the formula which will be
179applied when writing values to the chip. The two formulas are obviously
180related, and are separated by a comma.
181
182A
183.I compute
184statement applies to all sub\-features of the target feature for which
185it makes sense. For example, the above example would affect sub\-features
186in3_min and in3_max (which are voltage values) but not in3_alarm
187(which is a boolean flag.)
188
189The following operators are supported in
190.I compute
191statements:
192.RS
193+ \- * / ( ) ^ `
194.RE
195^x means exp(x) and `x means ln(x).
196
197You may use the name of sub\-features in these expressions; current readings
198are substituted. You should be careful though to avoid circular references.
199
200If at any moment a translation between a raw and a real\-world value is
201called for, but no
202.I compute
203statement applies, a one\-on\-one translation is used instead.
204
205.SS SET STATEMENT
206
207A
208.I set
209statement is used to write a sub\-feature value to the chip. Of course not
210all sub\-feature values can be set that way, in particular input values
211and alarm flags can not. Valid sub\-features are usually min/max limits.
212Example:
213
214.RS
215set in3_min  5 * 0.95
216.RE
217.RS
218set in3_max  5 * 1.05
219.RE
220
221The example above basically configures the chip to allow a 5% deviance
222for the +5V power input.
223
224The first argument is the feature name. The second argument is an expression
225which determines the written value. If there is an applying
226.I compute
227statement, this value is fed to its third argument to translate it to a
228raw value.
229
230You may use the name of sub\-features in these expressions; current readings
231are substituted. You should be careful though to avoid circular references.
232
233Please note that
234.I set
235statements are only executed by sensors(1) when you use the
236.B \-s
237option. Typical graphical sensors applications do not care about these
238statements at all.
239
240.SS BUS STATEMENT
241
242A
243.I bus
244statement binds the description of an I2C or SMBus adapter to a bus number.
245This makes it possible to refer to an adapter in the configuration file,
246independent of the actual correspondence of bus numbers and actual
247adapters (which may change from moment to moment). Example:
248
249.RS
250bus "i2c\-0" "SMBus PIIX4 adapter at e800"
251.RE
252
253The first argument is the bus number. It is the literal text
254.IR i2c\- ,
255followed by a number. As there is a dash in this argument, it must
256always be quoted.
257
258The second argument is the adapter name, it must match exactly the
259adapter name as it appears in
260.IR /sys/class/i2c\-adapter/i2c\-*/name .
261It should always be quoted as well as it will most certainly contain
262spaces or dashes.
263
264The
265.I bus
266statements may be scattered randomly throughout the configuration file;
267there is no need to place the bus line before the place where its binding
268is referred to. Still, as a matter of good style, we suggest you place
269all
270.I bus
271statements together at the top of your configuration file.
272
273Running
274.B sensors --bus-list
275will generate these lines for you.
276
277.SS STATEMENT ORDER
278
279Statements can go in any order, however it is recommended to put
280`set fanX_div' statements before `set fanX_min' statements, in case
281a driver doesn't preserve the fanX_min setting when the fanX_div
282value is changed. Even if the driver does, it's still better to put
283the statements in this order to avoid accuracy loss.
284
285.SH VOLTAGE COMPUTATION DETAILS
286
287Most voltage sensors in sensor chips have a range of 0 to 4.08 V.
288This is generally sufficient for the +3.3V and CPU supply voltages, so
289the sensor chip reading is the actual voltage.
290
291Other supply voltages must be scaled with an external resistor network.
292The driver reports the value at the chip's pin (0 \- 4.08 V), and the
293userspace application must convert this raw value to an actual voltage.
294The
295.I compute
296statements provide this facility.
297
298Unfortunately the resistor values vary among motherboard types.
299Therefore you have to figure out the correct resistor values for your
300own motherboard.
301
302For positive voltages (typically +5V and +12V), two resistors are used,
303with the following formula:
304        R1 = R2 * (Vs/Vin \- 1)
305
306where:
307        R1 and R2 are the resistor values
308        Vs is the actual voltage being monitored
309        Vin is the voltage at the pin
310
311This leads to the following compute formula:
312        compute inX @*((R1/R2)+1),  @/(((R1/R2)+1)
313
314Real\-world formula for +5V and +12V would look like:
315        compute in3 @*((6.8/10)+1), @/((6.8/10)+1)
316        compute in4 @*((28/10)+1),  @/((28/10)+1)
317
318For negative voltages (typically \-5V and \-12V), two resistors are used
319as well, but different boards use different strategies to bring the
320voltage value into the 0 \- 4.08 V range. Some use an inverting
321amplifier, others use a positive reference voltage. This leads to
322different computation formulas. Note that most users won't have to care
323because most modern motherboards make little use of \-12V and no use of
324\-5V so they do not bother monitoring these voltage inputs.
325
326Real\-world examples for the inverting amplifier case:
327        compute in5 \-@*(240/60), \-@/(240/60)
328        compute in6 \-@*(100/60), \-@/(100/60)
329
330Real\-world examples for the positive voltage reference case:
331        compute in5 @*(1+232/56) \- 4.096*232/56, (@ + 4.096*232/56)/(1+232/56)
332        compute in6 @*(1+120/56) \- 4.096*120/56, (@ + 4.096*120/56)/(1+120/56)
333
334Many recent monitoring chips have a 0 \- 2.04 V range, so scaling resistors
335are even more needed, and resistor values are different.
336
337There are also a few chips out there which have internal scaling
338resistors, meaning that their value is known and doesn't change from
339one motherboard to the next. For these chips, the driver usually
340handles the scaling so it is transparent to the user and no
341.I compute
342statements are needed.
343
344.SH TEMPERATURE CONFIGURATION
345
346On top of the usual features, temperatures can have two specific
347sub\-features: temperature sensor type (tempX_type) and hysteresis
348values (tempX_max_hyst and tempX_crit_hyst).
349
350.SS THERMAL SENSOR TYPES
351
352Available thermal sensor types:
353.TS
354r l.
3551       PII/Celeron Diode
3562       3904 transistor
3573       thermal diode
3584       thermistor
3595       AMD AMDSI
3606       Intel PECI
361.TE
362
363For example, to set temp1 to thermistor type, use:
364
365.RS
366set temp1_type 4
367.RE
368
369Only certain chips support thermal sensor type change, and even these
370usually only support some of the types above. Please refer to the
371specific driver documentation to find out which types are supported
372by your chip.
373
374In theory, the BIOS should have configured the sensor types correctly,
375so you shouldn't have to touch them, but sometimes it isn't the case.
376
377.SS THERMAL HYSTERESIS MECHANISM
378
379Many monitoring chips do not handle the high and critical temperature
380limits as simple limits. Instead, they have two values for each
381limit, one which triggers an alarm when the temperature rises and another
382one which clears the alarm when the temperature falls. The latter is
383typically a few degrees below the former. This mechanism is known as
384hysteresis.
385
386The reason for implementing things that way is that high temperature
387alarms typically trigger an action to attempt to cool the system down,
388either by scaling down the CPU frequency, or by kicking in an extra
389fan. This should normally let the temperature fall in a timely manner.
390If this was clearing the alarm immediately, then the system would be
391back to its original state where the temperature rises and the alarm
392would immediately trigger again, causing an undesirable tight fan on,
393fan off loop. The hysteresis mechanism ensures that the system is
394really cool before the fan stops, so that it will not have to kick in
395again immediately.
396
397So, in addition to tempX_max, many chips have a tempX_max_hyst
398sub-feature. Likewise, tempX_crit often comes with tempX_max_crit.
399Example:
400
401.RS
402set temp1_max      60
403.RE
404.RS
405set temp1_max_hyst 56
406.RE
407
408The hysteresis mechanism can be disabled by giving both limits the same
409value.
410
411.SH BEEPS
412
413Some chips support alarms with beep warnings. When an alarm is triggered
414you can be warned by a beeping signal through your computer speaker. On
415top of per\-feature beep flags, there is usually a master beep control
416switch to enable or disable beeping globally. Enable beeping using:
417
418.RS
419set beep_enable 1
420.RE
421
422or disable it using:
423
424.RS
425set beep_enable 0
426.RE
427
428.SH WHICH STATEMENT APPLIES
429
430If more than one statement of the same kind applies at a certain moment,
431the last one in the configuration file is used. So usually, you should
432put more general
433.I chip
434statements at the top, so you can overrule them below.
435
436.SH SYNTAX
437Comments are introduced by hash marks. A comment continues to the end of the
438line. Empty lines, and lines containing only whitespace or comments are
439ignored.  Other lines have one of the below forms. There must be whitespace
440between each element, but the amount of whitespace is unimportant. A line
441may be continued on the next line by ending it with a backslash; this does
442not work within a comment,
443.B NAME
444or
445.BR NUMBER .
446
447.RS
448bus
449.B NAME NAME NAME
450.sp 0
451chip
452.B NAME\-LIST
453.sp 0
454label
455.B NAME NAME
456.sp 0
457compute
458.B NAME EXPR
459,
460.B EXPR
461.sp 0
462ignore
463.B NAME
464.sp 0
465set
466.B NAME EXPR
467.RE
468.sp
469A
470.B NAME
471is a string. If it only contains letters, digits and underscores, it does not
472have to be quoted; in all other cases, you must use double quotes around it.
473Within quotes, you can use the normal escape\-codes from C.
474
475A
476.B NAME\-LIST
477is one or more
478.B NAME
479items behind each other, separated by whitespace.
480
481A
482.B EXPR
483is of one of the below forms:
484
485.RS
486.B NUMBER
487.sp 0
488.B NAME
489.sp 0
490@
491.sp 0
492.B EXPR
493+
494.B EXPR
495.sp 0
496.B EXPR
497\-
498.B EXPR
499.sp 0
500.B EXPR
501*
502.B EXPR
503.sp 0
504.B EXPR
505/
506.B EXPR
507.sp 0
508\-
509.B EXPR
510.sp 0
511^
512.B EXPR
513.sp 0
514`
515.B EXPR
516.sp 0
517(
518.B EXPR
519)
520.RE
521
522A
523.B NUMBER
524is a floating\-point number. `10', `10.4' and `.4' are examples of valid
525floating\-point numbers; `10.' or `10E4' are not valid.
526
527.SH FILES
528.I /etc/sensors3.conf
529.br
530.I /etc/sensors.conf
531.RS
532The system-wide
533.BR libsensors (3)
534configuration file. /etc/sensors3.conf is tried first, and if it doesn't exist,
535/etc/sensors.conf is used instead.
536
537.SH SEE ALSO
538libsensors(3)
539
540.SH AUTHOR
541Frodo Looijaard and the lm_sensors group
542http://www.lm-sensors.org/
543
544
545
Note: See TracBrowser for help on using the browser.