pyrowiz
Posts: 4
Joined: Sun Dec 08, 2019 7:33 pm

Raspberry Pi 3B+ Internal Temperatures

Tue Dec 17, 2019 2:38 pm

Hi folks,

There seems to be two common ways of reading the temperature of RaPi internals:

Code: Select all

cat /sys/class/thermal/thermal_zone0/temp 

Code: Select all

vcgencmd measure_temp
Having read different tutorials and articles online about this, I've seen these two data points referred to as GPU temp and CPU temp inconsistently. I couldn't find any official documentation clarifying which temp reading corresponds to which processor so I'd be really happy if someone can clear this up for me.

Thanks!

trejan
Posts: 3063
Joined: Tue Jul 02, 2019 2:28 pm

Re: Raspberry Pi 3B+ Internal Temperatures

Tue Dec 17, 2019 3:19 pm

They're exactly the same temperature sensor so any reference to them being separate GPU and CPU temperature sensors is wrong. "vcgencmd measure_temp" is the closed source firmware reading the sensor whilst /sys/class/thermal/thermal_zone0/temp is a Linux kernel module that directly reads the sensor. The algorithm used to convert the raw reading to a temperature slightly differs which is why they don't match exactly.

AFAIK the Pi engineers say the vcgencmd measure_temp reading is preferred as that is what the firmware is reading and what determines throttling etc... The Pi 4 firmware seems to always round it to a whole number for some odd reason.

pyrowiz
Posts: 4
Joined: Sun Dec 08, 2019 7:33 pm

Re: Raspberry Pi 3B+ Internal Temperatures

Tue Dec 17, 2019 7:00 pm

trejan wrote:
Tue Dec 17, 2019 3:19 pm
They're exactly the same temperature sensor

This is really good to know, thanks for sharing.

Return to “Beginners”