Ubuntu / Debian: Install and configure lm-sensors

wget -q https://raw.githubusercontent.com/panticz/installit/master/install.lm-sensors.sh -O - | bash -

#!/bin/bash

# ensure that this script is run by root
if [ $(id -u) -ne 0 ]; then
  sudo $0
  exit
fi

# install lm-sensors
apt-get install -y lm-sensors

# install the latest version
if [ "$1" == "-n" ]; then
  wget http://mirrors.kernel.org/ubuntu/pool/universe/l/lm-sensors/lm-sensors_3.3.3-1ubuntu1_amd64.deb -P /tmp/
  dpkg -i /tmp/lm-sensors_*.deb
  rm /tmp/lm-sensors_*.deb
fi

# auto configure
yes | /usr/sbin/sensors-detect

Search for motherboard configuration
sudo dmidecode -t baseboard | grep "Product Name"
http://www.lm-sensors.org/wiki/Configurations/

Motherboard configurations
# MSI X58 Pro-E (MS-7522) / Fintek f71882fg
echo "f71882fg" >> /etc/modules
echo "#coretemp" >> /etc/modules
modprobe f71882fg
wget http://dl.panticz.de/lm-sensors/ms-7522.conf -O /etc/sensors.d/f71882fg.conf
sensors -s

# ASUS M2N32 WS Professional
cat /etc/sensors.d/asus_m2n.conf
wget http://dl.panticz.de/lm-sensors/m2n32_ws_professional.conf -O /etc/sensors.d/m2n32_ws_professional.conf

# SuperMicro PDSMi-LN4+
wget http://dl.panticz.de/lm-sensors/pdsmi-ln4.conf -O /etc/sensors.d/pdsmi-ln4.conf

View raw sensor data
sensors -u

# default config file
/etc/sensors3.conf

# view hardwired? fan alarm value
cat /sys/class/hwmon/hwmon8/device/fan1_alarm

OPTIONAL: check with icinga
/usr/lib/nagios/plugins/check_sensors

Links
http://www.lm-sensors.org/wiki/Configurations/MSI/X58-Pro-E
http://www.lm-sensors.org/wiki/FAQ/Chapter3#HowdoIsetnewlimits