How do you read CPU temps?

Status
Not open for further replies.

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
So I can see that the CPU temp might be viewable but exactly how is that performed?

Thanks,
Mark
 

pauldonovan

Explorer
Joined
May 31, 2011
Messages
76
Code:
sysctl | grep temperature


Or install the mbmon package. Only the latter works on my particular Atom 525 CPU.

Paul
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Solved

Paul,
Thanks for the reply. Once I got that well it didn't work however it helped me find the answer. Try this...

Code:
sysctl -a | grep temperature
Something else to try is replacing temperature with cpu, a full list of CPU items will be listed. Look for something that lists the cpu temperature and enter it into the command.

Here is what mine looks like...
Code:
%sysctl -a | grep cpu
kern.ccpu: 0
  <cpu count="2" mask="0x3">0, 1</cpu>
    <cpu count="2" mask="0x3">0, 1</cpu>
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
coretemp1: <CPU On-Die Thermal Sensors> on cpu1
est1: <Enhanced SpeedStep Frequency Control> on cpu1
p4tcc1: <CPU Frequency Thermal Control> on cpu1
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
coretemp1: <CPU On-Die Thermal Sensors> on cpu1
est1: <Enhanced SpeedStep Frequency Control> on cpu1
p4tcc1: <CPU Frequency Thermal Control> on cpu1
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
coretemp1: <CPU On-Die Thermal Sensors> on cpu1
est1: <Enhanced SpeedStep Frequency Control> on cpu1
p4tcc1: <CPU Frequency Thermal Control> on cpu1
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
coretemp1: <CPU On-Die Thermal Sensors> on cpu1
est1: <Enhanced SpeedStep Frequency Control> on cpu1
p4tcc1: <CPU Frequency Thermal Control> on cpu1
kern.smp.cpus: 2
kern.smp.maxcpus: 32
debug.cpufreq.verbose: 0
debug.cpufreq.lowest: 0
debug.kdb.stop_cpus: 1
hw.ncpu: 2
hw.acpi.cpu.cx_lowest: C1
machdep.hlt_cpus: 0
security.jail.param.cpuset.id: 0
dev.cpu.0.%desc: ACPI CPU
dev.cpu.0.%driver: cpu
dev.cpu.0.%location: handle=\_PR_.P001
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%parent: acpi0
dev.cpu.0.temperature: 43.0C
dev.cpu.0.freq: 3166
dev.cpu.0.freq_levels: 3166/89000 2770/77875 2670/80000 2336/72000 2044/63000 2003/65000 1752/56875 1502/48750 1251/40625 1001/32500 751/24375 500/16250 250/8125
dev.cpu.0.cx_supported: C1/0
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_usage: 100.00% last 55us
dev.cpu.1.%desc: ACPI CPU
dev.cpu.1.%driver: cpu
dev.cpu.1.%location: handle=\_PR_.P002
dev.cpu.1.%pnpinfo: _HID=none _UID=0
dev.cpu.1.%parent: acpi0
dev.cpu.1.temperature: 27.0C
dev.cpu.1.cx_supported: C1/0
dev.cpu.1.cx_lowest: C1
dev.cpu.1.cx_usage: 100.00% last 93us
dev.acpi_perf.0.%parent: cpu0
dev.acpi_perf.1.%parent: cpu1
dev.coretemp.0.%parent: cpu0
dev.coretemp.1.%parent: cpu1
dev.est.0.%parent: cpu0
dev.est.1.%parent: cpu1
dev.cpufreq.0.%driver: cpufreq
dev.cpufreq.0.%parent: cpu0
dev.cpufreq.1.%driver: cpufreq
dev.cpufreq.1.%parent: cpu1
dev.p4tcc.0.%parent: cpu0
dev.p4tcc.1.%parent: cpu1
%
And you can see my two cores are dev.cpu.0.temperature: 43.0C and dev.cpu.0.temperature: 27.0C but in your case the temperatures are likely to be closer as my CPU has a bad CPU 0 sensor. It's a known issue but I wasn't going to return my CPU since it works. Not worth the money to ship it back.

So I'll do this to read my temp on my good core...

Code:
%sysctl -a | grep cpu.1.temp
dev.cpu.1.temperature: 27.0C
%
And thanks again, without your comment I wouldn't think I was on the right path.

-Mark

P.S. I'd be curious if this works for everyone or if it fails. I placed a feature ticket in earlier today desiring a graph and possibly an email for temp alarms. I would like the ability to choose the core(s) and temp alarm set point. Any failure data might help the developers implementing it.
 
Status
Not open for further replies.
Top