root/lm-sensors/trunk/doc/developers/proc @ 1408

Revision 1408, 4.6 KB (checked in by mds, 11 years ago)

update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1Naming and data format standards under /proc
2--------------------------------------------
3
4The libsensors library offers an interface to the raw sensors data
5through the sysctl interface. See the doc/developers/sysctl
6and the libsensors source for further information.
7
8An alternative method that some programs use is to access the /proc
9files directly. This document briefly describes the standards that
10the drivers follow, so that an application program can access
11this data in a simple and consistent way.
12
13Note that not all chip drivers adhere to this standard.
14We will attempt to migrate older drivers to this standard,
15and ensure that new drivers follow this standard wherever possible.
16If you are developing a userspace application please send us
17feedback on this standard.
18
19Note that motherboards vary widely in the connections to sensor chips.
20There is no standard that ensures, for example, that the second
21temperature sensor is connected to the CPU, or that the second
22fan is on the CPU. Therefore, programs must provide a facility
23for the user to label or bind /proc entries for display.
24Sensor chips often have unused inputs that should be ignored
25by user programs.
26
27As each chip gets its own directory under /proc/sys/dev/sensors.
28The format is either chip-i2c-bus-hexaddress or chip-isa-hexaddress.
29(Exception - chip lm78-j has a '-' in it - should this be changed??)
30
31All /proc values are integers or floating point numbers.
32There is no facility in the lm_sensors package for drivers
33to output general strings via /proc.
34
35Guidelines for new entries:
36        - If there are multiple values, some r/w and some r/o,
37          put the r/w ones first
38
39
40-------------------------------------------------------------------------
41
42/proc entries are as follows:
43
44
45Entry   Values  Function
46-----   ------  --------
47alarms    1     Alarm bitmask.
48                Read only.
49                Integer representation of one, two, or three bytes.
50                A '1' bit means an alarm.
51                Chips should be programmed for 'comparator' mode so that
52                the alarm will 'come back' after you read the register
53                if it is still valid.
54                Generally a direct representation of a chip's internal
55                alarm registers; there is no standard for the position
56                of individual bits.
57                Bits are defined in kernel/include/sensors.h.
58
59beep      2     Beep/interrupt enable and bitmask.
60                The first value is 0 or 1 to globally disable
61                or enable the beeps.
62                The second value is a bitmask, with the
63                same format as 'alarms' with same bit locations.
64               
65fan[1-3]  2     Fan minimum and input value.
66                Two integers indicating RPM.
67                First value is read/write and second is read only.
68
69fan_div   3     Fan divisor.
70                Integers in powers of two (1,2,4,8,16,32,64,128).
71                Some chips only support values 1,2,4,8.
72                Entries correspond to the fans[1-3].
73                See doc/fan-divisors for details.
74
75in[0-8]   3     Voltage min, max, and input value.
76                Floating point values X.XX in volts from 0 to 4.01 volts.
77                Actual voltage depends on the scaling resistors on the
78                motherboard, as recommended in the chip datasheet.
79                This varies by chip and by motherboard.
80                Because of this variation, values are generally NOT scaled
81                by the chip driver, and must be done by the application.
82                However, some drivers (notably lm87 and via686a)
83                do scale, with various degrees of success.
84                These drivers will output the actual voltage.
85                First two values are read/write and third is read only.
86                Typical usage:
87                        in0     CPU #1 voltage (not scaled)
88                        in1     CPU #1 voltage (not scaled)
89                        in2     3.3V nominal (not scaled)
90                        in3     5.0V nominal (scaled)
91                        in4     12.0V nominal (scaled)
92                        in5     -12.0V nominal (scaled)
93                        in6     -5.0V nominal (scaled)
94                        in7     varies
95                        in8     varies
96
97pwm[1-3]  1- 2  Pulse width modulation fan control.
98                Integer 0 - 255, read/write.
99                Corresponds to the fans 1-3.
100                Second value, if present, is an enable (0 or 1)
101
102sensor[1-3]  1  Sensor type selection.
103                Integers 1,2,3, or thermistor Beta value (3435); read/write.
104
105temp,
106temp[1-3]  3    Temperature max, min or hysteresis, and input value.
107                Floating point values XXX.X or XXX.XX in degrees Celcius.
108                'temp' is used if there is only one temperature sensor on the
109                chip. Temp1 is generally the sensor inside the chip itself,
110                generally reported as "motherboard temperature".
111                Temp2 and temp3 are generally external sensors,
112                the thermal diode inside the CPU, generally reported as
113                "CPU temperature".
114
115vid        1    CPU core voltage.
116                Read only.
117                Floating point X.XX or X.XXX corresponding to CPU core voltage
118                as told to the sensor chip. Not always correct.
119
120vrm        1    Voltage Regulator Module version number.
121                "Floating point" X.X. Default 8.2.
122                Affects the way the driver calculates the core voltage from
123                the vid pins. See doc/vid for details.
Note: See TracBrowser for help on using the browser.