Saturday, June 9, 2018

Reading Temperatures - CPU and HDs

FreeBSD

On my pfSense router and NAS box the following works:

nasa: /etc# sysctl dev.cpu | grep temperatu
dev.cpu.3.temperature: 39.0C
dev.cpu.2.temperature: 39.0C
dev.cpu.1.temperature: 38.0C
dev.cpu.0.temperature: 41.0C
nasa: /etc# sysctl -n dev.cpu.0.temperature
38.0C
nasa: /etc# sysctl -n dev.cpu.1.temperature
37.0C
nasa: /etc# sysctl -n dev.cpu.2.temperature
39.0C
nasa: /etc# sysctl -n dev.cpu.3.temperature
40.0C
nasa: /etc# sysctl -n dev.cpu.4.temperature
sysctl: unknown oid 'dev.cpu.4.temperature'

Linux

On my VM server (RHEL7) acpi proved to be useless. lm-sensors proved to be useful, especially drivers coretemp-isa-0000 for reading CPU temps and (on this mb) it8728-isa-0a30 for reading fan RPM

[root@hyper alex]# yum install lm-sensors
[root@hyper alex]# sensors-detect
[root@hyper alex]# sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:        +27.8°C  (crit = +105.0°C)
temp2:        +29.8°C  (crit = +105.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +46.0°C  (high = +80.0°C, crit = +100.0°C)
Core 0:         +41.0°C  (high = +80.0°C, crit = +100.0°C)
Core 1:         +40.0°C  (high = +80.0°C, crit = +100.0°C)

it8728-isa-0a30
Adapter: ISA adapter
in0:          +0.04 V  (min =  +0.00 V, max =  +3.06 V)
in1:          +2.03 V  (min =  +0.00 V, max =  +3.06 V)
in2:          +2.03 V  (min =  +0.00 V, max =  +3.06 V)
in3:          +2.00 V  (min =  +0.00 V, max =  +3.06 V)
in4:          +0.01 V  (min =  +0.00 V, max =  +3.06 V)
in5:          +1.75 V  (min =  +0.00 V, max =  +3.06 V)
in6:          +1.50 V  (min =  +0.00 V, max =  +3.06 V)
3VSB:         +3.41 V  (min =  +0.00 V, max =  +6.12 V)
Vbat:         +3.29 V
fan1:        1108 RPM  (min =   10 RPM)
fan2:         528 RPM  (min =    0 RPM)
fan3:           0 RPM  (min =    0 RPM)
fan4:         531 RPM  (min =    0 RPM)
fan5:           0 RPM  (min =    0 RPM)
temp1:        +32.0°C  (low  =  +0.0°C, high = +70.0°C)  sensor = thermistor
temp2:        +25.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp3:        +37.0°C  (low  =  +0.0°C, high = +80.0°C)  sensor = Intel PECI
intrusion0:  ALARM

[root@hyper alex]# sensors -A coretemp-isa-0000|grep "id 0"|awk '{print $4}'
+42.0°C

Windows

On my workstation the following works:

nasa: ??

Testing

I used stress-ng package to stress CPU:

[root@hyper ~]# stress-ng -c 4  -v


No comments:

Post a Comment