lm sensors

From Gentoo Wiki
Jump to: navigation, search

External resources

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

Installation

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.

Kernel

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

Kernel configurationEnable 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)

Software

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:

→ Information about USE flags
USE flag 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 libraries

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

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

Configuration

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

Testing

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

user $ sensors
coretemp-isa-0000
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)

Troubleshooting

See the lm_sensors FAQ.