Guide How to get the internal temperature of a Raspberry Pi

CLI Command

Use the below command to get the internal temperature of the Raspberry Pi SoC (System on a chip).

vcgencmd measure_temp

This will return the temperature of the main CPU/GPU unit in the Pi.

The output should look like the following:

$ vcgencmd measure_temp
temp=58.0'C

If you have a Raspberry Pi 4, you can use the following command:

vcgencmd measure_temp pmic

This will return the temperature sensor value from the PMIC (Power Management Integrated Circuit).

The output should look like the following:

$ vcgencmd measure_temp pmic
temp=55.2'C

Which one do you need? That depends.

The PMIC helps regulate voltage to the various devices on the Pi. in addition to the main SoC, it also provide power to the various accessories, IO ports and what not.

The temperature reported by vcgencmd measure_temp pmic will vary with power draw. Things that affect power draw include number of USB devices plugged in.

The temperature reported by vcgencmd measure_temp is primarily affected by the CPU and GPU usage.

Monitoring CPU/GPU usage is important as high temperatures may cause the system to throttle down in order to reduce heat. In envinromnets that stress the pi, both passive (heatsinks) and active (fans) cooling may help prevent throttling.