Naming and data format standards under /proc -------------------------------------------- The libsensors library offers an interface to the raw sensors data through the sysctl interface. See the doc/developers/sysctl and the libsensors source for further information. An alternative method that some programs use is to access the /proc files directly. This document briefly describes the standards that the drivers follow, so that an application program can scan for entries and access this data in a simple and consistent way. Note that not all chip drivers adhere to this standard. We will attempt to migrate older drivers to this standard, and ensure that new drivers follow this standard wherever possible. If you are developing a userspace application please send us feedback on this standard. Note that motherboards vary widely in the connections to sensor chips. There is no standard that ensures, for example, that the second temperature sensor is connected to the CPU, or that the second fan is on the CPU. Therefore, programs must provide a facility for the user to label or bind /proc entries for display. Sensor chips often have unused inputs that should be ignored by user programs. Each chip gets its own directory under /proc/sys/dev/sensors. The format is either chip-i2c-bus-hexaddress or chip-isa-hexaddress. (Exception - chip lm78-j has a '-' in it - should this be changed??) New dummy drivers may present chips as chip-busname-hexaddress. All /proc values are integers or floating point numbers. There is no facility in the lm_sensors package for drivers to output general strings via /proc. This facility may be added in the future. Alarms are direct indications read from the chips. The drivers do NOT make comparisons of readings to thresholds. This allows violations between readings to be caught and alarmed. The exact definition of an alarm (for example, whether a threshold must be met or must be exceeded to cause an alarm) is chip-dependent. Guidelines for new entries: - If there are multiple values, some r/w and some r/o, put the r/w ones first. - Additional non-standard values should be after the standard values. ------------------------------------------------------------------------- /proc entries are as follows: Entry Values Function ----- ------ -------- alarms 1 Alarm bitmask. Read only. Integer representation of one to four bytes. A '1' bit means an alarm. Chips should be programmed for 'comparator' mode so that the alarm will 'come back' after you read the register if it is still valid. Generally a direct representation of a chip's internal alarm registers; there is no standard for the position of individual bits. Bits are defined in kernel/include/sensors.h. beep 2 Beep/interrupt enable and bitmask. The first value is 0 or 1 to globally disable or enable the beeps. The second value is a bitmask, with the same format as 'alarms' with same bit locations. curr[1-n] 3 Current max, min or hysteresis, and input value. Floating point values XX.X or XX.XX in Amps. The second value is preferably a hysteresis value, reported as a absolute current, NOT a delta from the max value. First two values are read/write and third is read only. fan[1-3] 2 Fan minimum and input value. Two integers indicating RPM. First value is read/write and second is read only. fan_div 3 Fan divisor. Integers in powers of two (1,2,4,8,16,32,64,128). Some chips only support values 1,2,4,8. Entries correspond to the fans[1-3]. See doc/fan-divisors for details. in[0-8] 3 Voltage min, max, and input value. Floating point values X.XX in volts from 0 to 4.01 volts. Actual voltage depends on the scaling resistors on the motherboard, as recommended in the chip datasheet. This varies by chip and by motherboard. Because of this variation, values are generally NOT scaled by the chip driver, and must be done by the application. However, some drivers (notably lm87 and via686a) do scale, with various degrees of success. These drivers will output the actual voltage. First two values are read/write and third is read only. Typical usage: in0 CPU #1 voltage (not scaled) in1 CPU #1 voltage (not scaled) in2 3.3V nominal (not scaled) in3 5.0V nominal (scaled) in4 12.0V nominal (scaled) in5 -12.0V nominal (scaled) in6 -5.0V nominal (scaled) in7 varies in8 varies pwm[1-3] 1-2 Pulse width modulation fan control. Integer 0 - 255, read/write. 255 is max or 100%. Corresponds to the fans 1-3. Second value, if present, is an enable (0 or 1) sensor[1-3] 1 Sensor type selection. Integers 1,2,3, or thermistor Beta value (3435); read/write. temp, temp[1-4] 3 Temperature max, min or hysteresis, and input value. Floating point values XXX.X or XXX.XX in degrees Celsius. 'temp' is used if there is only one temperature sensor on the chip; for multiple temps. start with 'temp1'. Temp1 is generally the sensor inside the chip itself, generally reported as "motherboard temperature". Temp2 to temp4 are generally sensors external to the chip itself, for example the thermal diode inside the CPU or a termistor nearby. The second value is preferably a hysteresis value, reported as a absolute temperature, NOT a delta from the max value. First two values are read/write and third is read only. vid 1 CPU core voltage. Read only. Floating point X.XX or X.XXX corresponding to CPU core voltage as told to the sensor chip. Not always correct. vrm 1 Voltage Regulator Module version number. "Floating point" X.X. Default 8.2. Affects the way the driver calculates the core voltage from the vid pins. See doc/vid for details.