{{tag>[hardware temperature centos]}}
=====Temperature control CentOS / Fedora=====
Control the fan speed to reduce noise.
====Retrieve useful information====
* Install lm_sensors:# dnf install lm_sensors
* Run ''sensors-detect'', accept the defaults.
* View the output of the ''sensors'' command.# sensors
nouveau-pci-0100
Adapter: PCI adapter
GPU core: +0.90 V
temp1: +60.0°C (high = +95.0°C, hyst = +3.0°C)
(crit = +105.0°C, hyst = +5.0°C)
(emerg = +135.0°C, hyst = +5.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +42.0°C (high = +80.0°C, crit = +98.0°C)
Core 0: +38.0°C (high = +80.0°C, crit = +98.0°C)
Core 1: +40.0°C (high = +80.0°C, crit = +98.0°C)
Core 2: +40.0°C (high = +80.0°C, crit = +98.0°C)
Core 3: +41.0°C (high = +80.0°C, crit = +98.0°C)
it8728-isa-0290
Adapter: ISA adapter
in0: +1.04 V (min = +0.00 V, max = +3.06 V)
in1: +0.08 V (min = +0.00 V, max = +3.06 V)
in2: +2.95 V (min = +0.00 V, max = +3.06 V)
+3.3V: +3.34 V (min = +0.00 V, max = +6.12 V)
in4: +0.01 V (min = +0.00 V, max = +3.06 V)
in5: +0.82 V (min = +0.00 V, max = +3.06 V)
in6: +1.54 V (min = +0.00 V, max = +3.06 V)
3VSB: +3.36 V (min = +0.00 V, max = +6.12 V)
Vbat: +2.86 V
fan1: 769 RPM (min = 0 RPM)
fan2: 0 RPM (min = 0 RPM)
temp1: +37.0°C (low = +127.0°C, high = +127.0°C) sensor = thermistor
temp2: +43.0°C (low = +127.0°C, high = +127.0°C) sensor = thermistor
temp3: +29.0°C (low = +127.0°C, high = +127.0°C) sensor = Intel PECI
intrusion0: ALARM
* Find a reliable temperature sensor, for example run a CPU ''stress'' test. In this case ''temp3'' seems to be a reliable sensor:# before stressing the CPU:
temp3: +29.0°C (low = +127.0°C, high = +127.0°C) sensor = Intel PECI
# during the CPU stress test (stress -c 4)
temp3: +58.0°C (low = +127.0°C, high = +127.0°C) sensor = Intel PECI
====Configure with pwmconfig====
* If needed, stop the ''fancontrol'' process:systemctl stop fancontrol
* Run ''pwmconfig''.
* Fan ''hwmon2/device/fan1_input'' was the only fan found.
* The above fan is controlled by ''hwmon2/device/pwm1''.
* The correlation between PWM and FAN was:
PWM 255 FAN 2351
PWM 240 FAN 2265
PWM 225 FAN 2136
PWM 210 FAN 1997
PWM 195 FAN 1854
PWM 180 FAN 1717
PWM 165 FAN 1577
PWM 150 FAN 1430
PWM 135 FAN 1280
PWM 120 FAN 1125
PWM 105 FAN 965
PWM 90 FAN 802
PWM 75 FAN 629
PWM 60 FAN 0
Fan Stopped at PWM = 60
* Note than PWM ''hwmon2/device/pwm3'' also controlled the same fan, but correlation was not good.
* Set up device ''hwmon2/device/pwm1''
* Select temperature sensor ''temp3_input''
* Low temperature: 25 degree C.
* High temperature: 60 degree C.
* fan STOPS spinning at: 50 (use safe value)
* fan STARTS spinning at: 80 (use safe value)
* PWM value for temperature below limit: 0
* PWM value for temperature over limit: 255
* Save and quit.
====fancontrol service====
* Enable fancontrol at boot:systemctl enable fancontrol
* Start fancontrol:systemctl start fancontrol
===pwmconfig generated configuration file===
''/etc/fancontrol''
# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon2=devices/platform/it87.656
DEVNAME=hwmon2=it8728
FCTEMPS= hwmon2/device/pwm1=hwmon2/device/temp3_input
FCFANS=hwmon2/device/pwm3=hwmon2/device/fan1_input hwmon2/device/pwm1=hwmon2/device/fan1_input
MINTEMP= hwmon2/device/pwm1=25
MAXTEMP= hwmon2/device/pwm1=60
MINSTART= hwmon2/device/pwm1=80
MINSTOP= hwmon2/device/pwm1=50
MINPWM=hwmon2/device/pwm1=0
====Addition information====
===List hwmon sensors===
''ls /sys/class/hwmon/ -al''
total 0
drwxr-xr-x. 2 root root 0 8 jun 12:40 .
drwxr-xr-x. 52 root root 0 8 jun 12:40 ..
lrwxrwxrwx. 1 root root 0 8 jun 10:15 hwmon0 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon0
lrwxrwxrwx. 1 root root 0 8 jun 10:16 hwmon1 -> ../../devices/platform/coretemp.0/hwmon/hwmon1
lrwxrwxrwx. 1 root root 0 8 jun 12:39 hwmon2 -> ../../devices/platform/it87.656/hwmon/hwmon2
===Show labels===
Does not work on all (newer?) systems.
cd /sys/class/hwmon/hwmon2/device
grep "" temp*label
temp1_label:SYSTIN
temp2_label:CPUTIN
temp3_label:AUXTIN
temp6_label:PECI Agent 0
===Supermicro / CentOS 6===
I had to change /usr/sbin/fancontrol to set value 5 on reset instead of 0
# Try pwmN_enable=5
echo 5 > $ENABLE 2> /dev/null
if [ `cat $ENABLE` -eq 5 ]