lm sensors

From Gentoo Wiki
Jump to: navigation, search


lm_sensors is an utility to monitor temperature, fan and voltage sensors.


Hardware detection

You can check the Supported Device List. Alternatively you can enable all drivers and let the sensors-detect program do the work for you.


You need I2C support. Also you need to activate the following kernel options:

KERNEL Enable I2C_CHARDEV & hardware mon driver in your kernel
Device Drivers  --->
    -*- I2C support  --->
        <*>   I2C device interface
    <*> Hardware Monitoring support  --->
        Select a driver, e.g.:
        [*] Intel Core/Core2/Atom temperature sensor (coretemp)


Portage knows the global USE flag lm_sensors for enabling support for lm_sensors in other packages. Enabling this USE flag will pull in sys-apps/lm_sensors automatically:

FILE /etc/portage/make.conf
USE="... lm_sensors ..."

The USE flags of lm_sensors are:

USE flag (what is that?) Default Recommended Description
sensord No Enable sensord - a daemon that can be used to periodically log sensor readings from hardware health-monitoring chips
static-libs No Build static versions of dynamic libraries as well

After setting this you want to update your system so the changes take effect:

root #emerge --ask --changed-use --deep @world


If you build all kernel options into the kernel, you can skip the next section and proceed with testing. Otherwise configure your modules.

Configure modules

You need to run sensors-detect to detect your sensors and the needed kernel modules:

root #sensors-detect

Follow the instructions and answer the last question, whether /etc/conf.d/lm_sensors should be generated/overwritten, with "yes".

You can now start lm_sensors:

root #/etc/init.d/lm_sensors start

To start lm_sensors at boot time, add it your default runlevel:

root #rc-update add lm_sensors default


Now you can test, if everything works, e.g.:

user $sensors
Adapter: ISA adapter
Core 0:       +48.0°C  (high = +100.0°C, crit = +100.0°C)
Core 1:       +48.0°C  (high = +100.0°C, crit = +100.0°C)


See the lm_sensors FAQ.