Short lm_sensors Howto

lm-sensors logo

lm-sensors hardware monitoring

I’m currently using sensors version 3.3.2 on my ASRock P67 Professional mainboard. To get informed once one of the 3 fans die or the temperature or voltage is getting critical, I use the Nagios plugin “check_sensors”, which is part of the official Nagios plugins.

The setup is very easy: first run the script sensors-detect, which is part of the sensors package. Just press [Enter] all the time and in the end you should get a first working /etc/sensors3.conf configuration file and can start the daemon with rclm_sensors start.

But this is just the initial starting point: if you execute the command sensors now, you’ll see some “ALARMS” after the values for some sensors. In my case, this affected the “in1”, “in4”, “in5”, “fan1” – “fan5”, “intrusion0″, intrusion1” and the “SYSTIN” sensors. So how to proceed?

  1. First task: find out the exact chipset: this is easy, as it is printed at the top of the sensors output. In my case: nct6776-isa-0290
  2. Second task: create a new config file /etc/sensors.d/nct6776-isa-0290 (you might choose another name, any filename in /etc/sensors.d/ will be ok).
  3. Third task: fill the new config file with your values. To get a list of possible names and find out how to set the values, just run the command sensors -u, which will print out the raw output of the sensors. In my case (as example), I could translate the “SYSTIN” into:
SYSTIN:
  temp1_input: 34.000
  temp1_max: 0.000
  temp1_max_hyst: 0.000
  temp1_alarm: 1.000
  temp1_type: 4.000
  temp1_offset: 0.000

So I added the following lines into the /etc/sensors.d/nct6776-isa-0290 file:

chip "nct6776-isa-0290"
        set temp1_max 50
        set temp1_max_hyst 50

To check if the new settings work, just run the command sensors -s followed by sensors – in my case this fixed the alarm for the SYSTIN sensor.

This way, I set also some values for the installed fans and the power sensors. What’s left are the “intrusionX” and sensors for uninstalled fans. As their informations are not of any interest for me, I told sensors to ignore them by adding the following lines to my /etc/sensors.d/nct6776-isa-0290 file:

    ignore fan3
    ignore fan5
    ignore intrusion0
    ignore intrusion1

As result, the whole file contains now:

chip "nct6776-isa-0290"
    set temp1_max 50
    set temp1_max_hyst 50
    set in1_min 1.600
    set in1_max 2.000
    set in4_min 1.450
    set in4_max 1.800
    set in5_min 1.450
    set in5_max 1.80
    set fan1_min 2000.000
    set fan2_min 2000.000
    set fan4_min 2000.000
    ignore fan3
    ignore fan5
    ignore intrusion0
    ignore intrusion1

As result, after a restart of lm_sensors via rclm_sensors restart, the output of sensors showed no alarms any more – and also /usr/lib/nagios/plugins/check_sensors returned with “sensor ok”.

About Lars Vogdt

This is the private blog space of Lars Vogdt, the topics will be in first place work related.
This entry was posted in openSUSE, SUSE Linux Enterprise and tagged , , , , , . Bookmark the permalink.

1 Response to Short lm_sensors Howto

  1. Thanks, Lars. It was really easy to get my syste “just right” after reading this article.

Leave a comment