How to measure a CPU temperature on Linux OS
Printed From: ASRock.com
Category: Technical Support
Forum Name: AMD Motherboards
Forum Description: Question about ASRock AMD motherboards
URL: https://forum.asrock.com/forum_posts.asp?TID=106623
Printed Date: 21 Apr 2025 at 7:16am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: How to measure a CPU temperature on Linux OS
Posted By: Yuh.K
Subject: How to measure a CPU temperature on Linux OS
Date Posted: 16 Apr 2025 at 1:49pm
Hello. Currently, I'm using "B650 Steel Legend WiFi" with Ubuntu OS. I'd like to measure a CPU temperature (per Core). So, installed "lm_sensors", and trying to execute "sensors" command. But it's failed to measure a CPU temperature. I guess that sensor modules for B650 are not installed, as a result, we cannot measure CPU temp.
Does someone know what sensor module we should install to measure it on B650 with Linux OS ? Or Is there any way to measure a CPU temperature on B650 with Linux OS ?
|
Replies:
Posted By: M440
Date Posted: 17 Apr 2025 at 1:43am
for my board the nct6775 module need to be loaded
lsmod | grep nct modprobe nct6775
|
to load at boot up make a file in /etc/modules-load.d/ with content 'nct6775'
mm@desktop ~ > cat /etc/modules-load.d/20_nct6775.conf ------------------------------------------------------------------------ File: /etc/modules-load.d/20_nct6775.conf ------------------------------------------------------------------------- nct6775 -------------------------------------------------------------------------- mm@desktop ~ > sensors spd5118-i2c-6-50 Adapter: SMBus PIIX4 adapter port 0 at 0b00 temp1: +35.5°C (low = +0.0°C, high = +55.0°C) (crit low = +0.0°C, crit = +85.0°C)
nct6799-isa-0290 Adapter: ISA adapter in0: 1.03 V (min = +0.00 V, max = +1.74 V) in1: 1.85 V (min = +0.00 V, max = +0.00 V) ALARM in2: 3.42 V (min = +0.00 V, max = +0.00 V) ALARM in3: 3.33 V (min = +0.00 V, max = +0.00 V) ALARM in4: 1.66 V (min = +0.00 V, max = +0.00 V) ALARM in5: 1.06 V (min = +0.00 V, max = +0.00 V) in6: 1.18 V (min = +0.00 V, max = +0.00 V) ALARM in7: 3.42 V (min = +0.00 V, max = +0.00 V) ALARM in8: 3.30 V (min = +0.00 V, max = +0.00 V) ALARM in9: 1.79 V (min = +0.00 V, max = +0.00 V) ALARM in10: 1.22 V (min = +0.00 V, max = +0.00 V) ALARM in11: 1.12 V (min = +0.00 V, max = +0.00 V) ALARM in12: 1.02 V (min = +0.00 V, max = +0.00 V) ALARM in13: 896.00 mV (min = +0.00 V, max = +0.00 V) ALARM in14: 1.21 V (min = +0.00 V, max = +0.00 V) ALARM in15: 752.00 mV (min = +0.00 V, max = +0.00 V) ALARM in16: 1.81 V (min = +0.00 V, max = +0.00 V) ALARM in17: 248.00 mV (min = +0.00 V, max = +0.00 V) fan1: 0 RPM (min = 0 RPM) fan2: 761 RPM (min = 0 RPM) fan3: 0 RPM (min = 0 RPM) fan4: 531 RPM (min = 0 RPM) fan5: 428 RPM (min = 0 RPM) fan7: 492 RPM (min = 0 RPM) SYSTIN: +39.0°C (high = +80.0°C, hyst = +75.0°C) (crit = +127.0°C) sensor = thermistor CPUTIN: +36.0°C (high = +80.0°C, hyst = +75.0°C) (crit = +80.0°C) sensor = thermistor AUXTIN0: +16.0°C (high = +127.0°C, hyst = +110.0°C) (crit = +0.0°C) sensor = thermistor AUXTIN1: +15.0°C (high = +80.0°C, hyst = +75.0°C) (crit = +80.0°C) sensor = thermistor AUXTIN2: +19.0°C (high = +80.0°C, hyst = +75.0°C) (crit = +80.0°C) sensor = thermistor AUXTIN3: +15.0°C (high = +80.0°C, hyst = +75.0°C) (crit = +100.0°C) sensor = thermistor SMBUSMASTER 0: +46.5°C (high = +80.0°C, hyst = +75.0°C) AUXTIN4: +23.0°C (high = +80.0°C, hyst = +75.0°C) (crit = +80.0°C) AUXTIN5: +99.0°C PCH_CHIP_CPU_MAX_TEMP: +0.0°C PCH_CHIP_TEMP: +0.0°C PCH_CPU_TEMP: +0.0°C TSI0_TEMP: +46.6°C intrusion0: ALARM intrusion1: ALARM beep_enable: disabled
nvme-pci-0f00 Adapter: PCI adapter Composite: +38.9°C (low = -20.1°C, high = +83.8°C) (crit = +88.8°C) Sensor 2: +76.8°C
k10temp-pci-00c3 Adapter: PCI adapter Tctl: +46.6°C Tccd1: +37.0°C
nvme-pci-0200 Adapter: PCI adapter Composite: +39.9°C (low = -0.1°C, high = +82.8°C) (crit = +89.8°C)
mm@desktop ~ > fan2go detect > spd5118 Sensors Index Label Value 1 hwmon4/temp1 (temp1_input) 35500
> nct6799-isa-0290 Fans Index Channel Label RPM PWM Auto 1 1 hwmon2/fan1 0 77 false 2 2 hwmon2/fan2 758 81 false 3 3 hwmon2/fan3 0 0 true 4 4 hwmon2/fan4 532 67 true 5 5 hwmon2/fan5 428 67 true 6 7 hwmon2/fan7 492 67 true Sensors Index Label Value 1 SYSTIN (temp1_input) 39000 2 CPUTIN (temp2_input) 36000 3 AUXTIN0 (temp3_input) 16000 4 AUXTIN1 (temp4_input) 15000 5 AUXTIN2 (temp5_input) 19000 6 AUXTIN3 (temp6_input) 15000 7 SMBUSMASTER 0 (temp7_input) 46500 8 AUXTIN4 (temp8_input) 23000 9 AUXTIN5 (temp9_input) 99000 10 PCH_CHIP_CPU_MAX_TEMP (temp10_input) 0 11 PCH_CHIP_TEMP (temp11_input) 0 12 PCH_CPU_TEMP (temp12_input) 0 13 TSI0_TEMP (temp13_input) 46625
> nvme-pci-0f00 Sensors Index Label Value 1 Composite (temp1_input) 38850 2 Sensor 2 (temp3_input) 76850
> k10temp-pci-00c3 Sensors Index Label Value 1 Tctl (temp1_input) 46625 2 Tccd1 (temp3_input) 37500
> nvme-pci-0200 Sensors Index Label Value 1 Composite (temp1_input) 39850
mm@desktop ~ >
|
------------- asrock b650m/hdv.m2, ryzen 7700x@85watt
|
Posted By: Yuh.K
Date Posted: 17 Apr 2025 at 1:22pm
Thank you for your support.
As you mentioned, nct6775 is not loaded on my environment. I'm trying to load nct6775, but facing the problem of modprobe/make. So Currently, analyzing this matter.
========= # modprobe nct6775 modprobe: ERROR: could not insert 'nct6775': No such device
# git clone https://github.com/killghost/nct6775" rel="nofollow - https://github.com/killghost/nct6775 Cloning into 'nct6775'... remote: Enumerating objects: 281, done. remote: Total 281 (delta 0), reused 0 (delta 0), pack-reused 281 (from 1) Receiving objects: 100% (281/281), 150.95 KiB | 13.72 MiB/s, done. Resolving deltas: 100% (162/162), done. #
# make CC [M] /etc/netplan/nct6775/nct6775.o In file included from /etc/netplan/nct6775/nct6775.c:61: /etc/netplan/nct6775/nct6775.c: In function 'store_in_reg': /etc/netplan/nct6775/compat.h:20:18: error: implicit declaration of function 'strict_strtoul' [-Werror=implicit-function-declaration] 20 | #define kstrtoul strict_strtoul | ^~~~~~~~~~~~~~ /etc/netplan/nct6775/nct6775.c:1514:12: note: in expansion of macro 'kstrtoul' 1514 | int err = kstrtoul(buf, 10, &val); | ^~~~~~~~ /etc/netplan/nct6775/nct6775.c: In function 'store_temp': /etc/netplan/nct6775/compat.h:17:17: error: implicit declaration of function 'strict_strtol' [-Werror=implicit-function-declaration] 17 | #define kstrtol strict_strtol | ^~~~~~~~~~~~~ /etc/netplan/nct6775/nct6775.c:1953:8: note: in expansion of macro 'kstrtol' 1953 | err = kstrtol(buf, 10, &val); | ^~~~~~~ /etc/netplan/nct6775/nct6775.c: In function 'pwm_update_registers': /etc/netplan/nct6775/nct6775.c:2277:3: warning: this statement may fall through [-Wimplicit-fallthrough=] 2277 | nct6775_write_value(data, data->REG_TARGET[nr], | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2278 | data->target_temp[nr]); | ~~~~~~~~~~~~~~~~~~~~~~ /etc/netplan/nct6775/nct6775.c:2280:2: note: here 2280 | default: | ^~~~~~~ cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:297: /etc/netplan/nct6775/nct6775.o] Error 1 make[1]: *** [Makefile:1910: /etc/netplan/nct6775] Error 2 make: *** [Makefile:29: modules] Error 2 # ========
|
Posted By: M440
Date Posted: 17 Apr 2025 at 1:49pm
you have a different board,
your board manual at page 14 says you have nct6686
load nct6683 module
https://docs.kernel.org/hwmon/nct6683.html
https://github.com/lm-sensors/lm-sensors/issues/499
https://ibb.co/GvjwDyYg" rel="nofollow">
------------- asrock b650m/hdv.m2, ryzen 7700x@85watt
|
|