Lm-sensors-3-6-0

Introduction to Lm_sensors

The lm_sensors package provides userspace support for the hardware monitoring drivers in the Linux kernel. This is useful for monitoring the temperature of the CPU and adjusting the performance of some hardware (such as cooling fans).

This package is known to build and work properly using an LFS 12.1 platform.

Package Information

lm_sensors Dependencies

Required

Which-2.21

Optional

RRDtool (required to build the sensord program) and dmidecode (runtime)

Kernel Configuration

The following configuration options attempt to cover the most common hardware monitoring devices in a typical desktop or laptop system. View the help of each (by pressing the H button with the option focused in the make menuconfig) to know if you need it. There are many platform-specific hardware monitoring devices so it's impossible to list the configuration for all of them here. You may investigate the content of /sys/class/hwmon within a mainstream distro running on the system to know which drivers you need.

Power management and ACPI options --->
  [*] ACPI (Advanced Configuration and Power Interface) Support --->      [ACPI]
    < /*/M> Battery                                               [ACPI_BATTERY]
    < /*/M> Thermal Zone                                          [ACPI_THERMAL]

Device Drivers --->
  NVME Support --->
    < /*> NVM Express block device                                [BLK_DEV_NVME]
    # Set [HWMON] to <*> (not <M>!) or it will not show up:
    [ /*] NVMe hardware monitoring                                  [NVME_HWMON]
  <*/M> Hardware Monitoring support --->                                 [HWMON]
    < /*/M> AMD Athlon64/FX or Opteron temperature sensor       [SENSORS_K8TEMP]
    < /*/M> AMD Family 10h+ temperature sensor                 [SENSORS_K10TEMP]
    < /*/M> AMD Family 15h processor power                [SENSORS_FAM15H_POWER]
    < /*/M> Intel Core/Core2/Atom temperature sensor          [SENSORS_CORETEMP]

Recompile your kernel and reboot into the new kernel.

Installation of Lm_sensors

Install Lm_sensors by running the following commands:

make PREFIX=/usr        \
     BUILD_STATIC_LIB=0 \
     MANDIR=/usr/share/man

This package does not come with a test suite.

Now, as the root user:

make PREFIX=/usr        \
     BUILD_STATIC_LIB=0 \
     MANDIR=/usr/share/man install &&

install -v -m755 -d /usr/share/doc/lm_sensors-3-6-0 &&
cp -rv              README INSTALL doc/* \
                    /usr/share/doc/lm_sensors-3-6-0

Command Explanations

BUILD_STATIC_LIB=0: This parameter disables compiling and installing the static version of libsensors.

PROG_EXTRA=sensord: This parameter enables compiling sensord, a daemon that can monitor your system at regular intervals. Compiling sensord requires RRDtool. Be sure to install RRDtool in /usr by running make prefix=/usr when building it. Otherwise, Lm_sensors will not find it easily.

Configuring Lm_sensors

Config File

/etc/sensors3.conf

Contents

Installed Programs: fancontrol, isadump, isaset, pwmconfig, sensors, sensors-conf-convert, sensors-detect, and optionally, sensord
Installed Library: libsensors.so
Installed Directories: /etc/sensors.d, /usr/include/sensors and /usr/share/doc/lm_sensors-3-6-0

Short Descriptions

fancontrol

is a shell script for use with lm_sensors. It reads its configuration from a file, then calculates fan speeds from temperatures and sets the corresponding PWM outputs to the computed values

isadump

is a small helper program to examine registers visible through the ISA bus. It is intended to probe any chip that lives on the ISA bus working with an address register and a data register (I2C-like access) or a flat range (of up to 256 bytes)

isaset

is a small helper program to set registers visible through the ISA bus

pwmconfig

tests the pulse width modulation (PWM) outputs of sensors and configures fancontrol

sensors

prints the current readings of all sensor chips

sensors-conf-convert

is a Perl script to convert lm-sensors version 2 configuration files to work with version 3

sensors-detect

is a Perl script that will walk you through the process of scanning your system for various hardware monitoring chips (sensors) supported by libsensors, or more generally by the lm_sensors tool suite

sensord

(optional) is a daemon that can be used to periodically log sensor readings

libsensors.so

contains the lm_sensors API functions