lm_sensors allows you to monitor your critical hardware. Although it works out of the box, it often requires configuration to make the most of it, and that configuration is done with an lm_sensors configuration file.
The default configuration file at /etc/sensors3.conf only includes statements which do not differ from one motherboard to another. Only label, compute, and set statements for internal voltage and temperature sensors are included.
Many things do differ from one motherboard to another. These specific configurations should be placed in custom configuration files in /etc/sensors.d/MOTHERBOARD-NAME. This makes further updates much easier. Add /etc/sensors.d/ to your backup set so you don’t lose it next time you change distributions.
In particular, hardware alarm settings differ from one motherboard to another. This alone is reason to set up a custom configuration file: if you don’t, /var/log/messages will fill up with spurious alarm messages.
Where can you obtain an lm_sensors custom configuration file for your motherboard?
- The first place to look is the small but growing collection of custom configuration files maintained by the lm_sensors project.
- You can search the lm_sensors’ mailing list for your motherboard. Sometimes configurations are shared there among users and developers. If no joy, you can join the mailing list and ask.
- You can search the web for a string such as “lm_sensors configuration MOTHERBOARD-MODEL”.
- You can roll your own. Take an existing configuration file from the project website that uses your motherboard’s chip and modify it as needed. Save it with the manufacturer’s name and motherboard model number. I had to do that for to properly configure my Intel DG31GL motherboard.
However you obtain an appropriate configuration file, place it in /etc/sensors.d/, creating the directory if needed (owner root, permissions 755). Restart the lm_sensors service (as root, service lm_sensors restart). The output of sensors should now reflect your custom configuration file.
TIPS AND TRICKS
On my hardware, my custom configuration file is apparently not applied when recovering from hibernation, producing spurious alarm messages in /var/log/messages. I know of no solution for this other than rebooting after recovering from hibernation.
The lm_sensors project site
The configuration file for my Intel_DG31GL motherboard:
# lm_sensors configuration file for the Intel DG31GL motherboard # 2011-01-02, Warren Post <firstname.lastname@example.org> # Comments welcome # Winbond configuration adapted from Hans de Goede's work at: # http://www.lm-sensors.org/wiki/Configurations/ASRock/AM2NF3-VSTA chip "w83627dhg-*" label in0 "VCore" label in1 "VCore2" label in2 "AVCC" label in3 "3VCC" label in6 "12V" label in7 "VSB" label in8 "VBAT" # +12V and +5V use dividers recommended by datasheet compute in6 @*(1+(56/10)), @/(1+(56/10)) compute in9 @*(1+(22/10)), @/(1+(22/10)) # in4 and in5 are not used (they seem to be hooked up to 3.3v/2, but thats # already monitored) ignore in4 ignore in5 # we need to set all voltage limits (hurray for a well written BIOS) # Note you may need to adapt in0 and in1 depending on your CPU set in0_min 0.9 set in0_max 1.5 set in1_min 0.9 set in1_max 1.7 # Supress alarm; default value 1.5 set in2_min 3.3*0.95 set in2_max 3.3*1.05 set in3_min 3.3*0.95 set in3_max 3.3*1.05 set in6_min 0 # Supress alarm; default value 12.0*0.9 set in6_max 12.0*1.1 set in7_min 3.3*0.95 set in7_max 3.3*1.05 set in8_min 3.0 set in8_max 3.3*1.05 # Fans label fan1 "Case Fan" label fan2 "CPU Fan" ignore fan3 ignore fan4 ignore fan5 # Fan minumums set fan1_min 0 # Supress alarm; no case fan installed set fan2_min 1000 # Temperatures label temp1 "Sys Temp" label temp2 "CPU Temp" label temp3 "CPU2 Temp" ignore temp3 # Suppress alarm set temp1_max 100 # Supress alarm; default value 45 set temp1_max_hyst 100 # Supress alarm; default value 40 set temp2_max 100 # Supress alarm; default value 45 set temp2_max_hyst 100 # Supress alarm; default value 40 set temp3_max 45 set temp3_max_hyst 40