目錄表

監控 Linux 主機溫度風扇 (lm-sensors)

安裝與設定 lm-sensors

針對 sensors 的異常項目進行修改

  1. temp3, temp4, temp5, temp6, temp8 都是 0 或很奇怪的數字, 要移除不呈現

     vi /etc/sensors.d/nct6798.conf

    chip "nct6798-isa-*"
        ignore temp3
        ignore temp4
        ignore temp5
        ignore temp6
        ignore temp8
  2. fan1, fan3, fan4, fan5, fan7 都是 0 , 要移除不呈現

     vi /etc/sensors.d/nct6798.conf

    chip "nct6798-isa-*"
        ignore temp3
        ignore temp4
        ignore temp5
        ignore temp6
        ignore temp8
    
        # 忽略未使用的風扇
        ignore fan1
        ignore fan3
        ignore fan4
        ignore fan5
        ignore fan7
  3. 設定 fan2 的顯示名稱為 'CPU FAN', 並設定最小轉數 800 rpm

     vi /etc/sensors.d/nct6798.conf

    chip "nct6798-isa-*"
        ignore temp3
        ignore temp4
        ignore temp5
        ignore temp6
        ignore temp8
    
        # 忽略未使用的風扇
        ignore fan1
        ignore fan3
        ignore fan4
        ignore fan5
        ignore fan7
    
        # 設定 fan2 最小轉速
        set fan2_min 800
        label fan2 "CPU FAN"
  4. 要重新啟動服務

    service kmod restart
    sensors -s

  5. 檢查是否如預期的呈現結果

    sensors
    # sensors
    nct6798-isa-02a0
    Adapter: ISA adapter
    in0:                     1.40 V  (min =  +0.00 V, max =  +1.74 V)
    in1:                     1.02 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
    in2:                     3.41 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
    in3:                     3.39 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
    in4:                   992.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
    in5:                   152.00 mV (min =  +0.00 V, max =  +0.00 V)
    in6:                   136.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
    in7:                     3.41 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
    in8:                     3.18 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
    in9:                     1.06 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
    in10:                  160.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
    in11:                  128.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
    in12:                    1.06 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
    in13:                  160.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
    in14:                    1.51 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
    CPU FAN:               1920 RPM  (min =  800 RPM)
    SYSTIN:                +113.0°C  (high = +80.0°C, hyst = +75.0°C)
                                     (crit = +100.0°C)  sensor = thermistor
    CPUTIN:                 +46.0°C  (high = +80.0°C, hyst = +75.0°C)
                                     (crit = +100.0°C)  sensor = thermistor
    PECI Agent 0:           +54.5°C  (high =  +1.0°C, hyst = +75.0°C)  ALARM
    PCH_CHIP_CPU_MAX_TEMP:   +0.0°C
    PCH_CHIP_TEMP:           +0.0°C
    PCH_CPU_TEMP:            +0.0°C
    PCH_MCH_TEMP:            +0.0°C
    intrusion0:            ALARM
    intrusion1:            ALARM
    beep_enable:           disabled
    
    nvme-pci-0100
    Adapter: PCI adapter
    Composite:    +51.9°C  (low  =  -5.2°C, high = +89.8°C)
                           (crit = +93.8°C)
    
    iwlwifi_1-virtual-0
    Adapter: Virtual device
    temp1:            N/A
    
    coretemp-isa-0000
    Adapter: ISA adapter
    Package id 0:  +71.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 0:        +59.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 4:        +50.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 8:        +53.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 12:       +56.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 16:       +70.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 20:       +71.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 24:       +57.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 28:       +52.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 32:       +53.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 33:       +53.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 34:       +54.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 35:       +54.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 36:       +52.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 37:       +52.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 38:       +52.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 39:       +52.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 40:       +52.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 41:       +52.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 42:       +52.0°C  (high = +80.0°C, crit = +100.0°C)
    Core 43:       +52.0°C  (high = +80.0°C, crit = +100.0°C)