Skip to content

Raspberry Pi Temperature Command: Check CPU Heat and Throttling

To check Raspberry Pi CPU temperature, run vcgencmd measure_temp in a terminal on the Pi or over SSH. If the Pi slows down, check temperature, throttling flags, and CPU clock during the same workload to decide what to investigate.

Raspberry Pi temperature command: the quick answer

On a Pi 4 or Pi 5 running Raspberry Pi OS, start with this read-only command:

vcgencmd measure_temp

Here is a reading from a Raspberry Pi 4 Model B running 64-bit Raspberry Pi OS with kernel 6.18.50+rpt-rpi-v8:

temp=37.9'C

The chip's internal sensor read 37.9°C at that moment. Your reading will vary with workload, room temperature, and cooling. To watch it change, run:

watch -n 2 'vcgencmd measure_temp; vcgencmd get_throttled'

Stop with Ctrl+C. The official vcgencmd reference documents the temperature and clock commands.

Your question Next step
How hot is the CPU now? Run vcgencmd measure_temp
Is heat or power limiting speed? Read temperature, flags, and clock together
Is 60°C or 70°C too hot? Compare firmware thresholds with your model and workload
Why is the Pi 5 fan not spinning? Check its automatic fan curve
vcgencmd unavailable? Find the CPU sensor in Linux or check the utility
Need a local warning? Use the one-shot checker

Is 60°C or 70°C normal for a Raspberry Pi?

There is no single normal idle temperature for all boards. Model, ambient temperature, enclosure, airflow, and workload all matter. A 60°C or 70°C reading alone does not establish an emergency or a throttling event.

The official thermal-control documentation describes these control points:

SoC temperature Firmware behaviour
Below 80°C Below the general progressive thermal-throttling range; power faults or model-specific rules can still limit performance
80–85°C Arm clocks are progressively limited
At 85°C Arm and GPU clocks are limited

Raspberry Pi 3B+ has an additional default 60°C soft limit. Do not apply that older model's rule to Pi 4 or Pi 5.

These are firmware control points, not recommended user alert settings. You might choose a warning at 75°C to investigate cooling before reaching the general throttling range. That is an example operating policy, not a new hardware limit.

Compare idle and the workload that matters to you. Record the case, fan, room conditions, and duration so you can compare readings after a cooling change.

Temperature is not the same as throttling

When the Pi feels slow, run these three commands while the slowdown is happening:

1
2
3
4
# Sample the chip temperature, firmware flags, and Arm clock.
vcgencmd measure_temp
vcgencmd get_throttled
vcgencmd measure_clock arm

The same Pi 4 reported throttled=0x50000 and frequency(48)=1800404352 alongside the 37.9°C reading. The clock was about 1.80 GHz at that instant. The flag indicates earlier undervoltage and throttling. Both current bits were clear, so the reading cannot tell when the earlier events happened or what caused the throttle.

What you see What to check next
Current undervoltage, for example 0x50005 Check the power supply, cable, and connected peripherals first.
Temperature rises toward the thermal limit and the clock drops under sustained load Check airflow, heatsink contact, and fan operation. Compare the same workload again after one change.
History flags only, for example 0x50000 Record a new sample during the slowdown. Use the history to guide what you check.
Clock is low at idle and flags are clear (0x0) Check the clock again during normal work. A low idle clock can come from CPU frequency scaling.

Paste your vcgencmd get_throttled output into the get_throttled decoder to see current warnings, historical flags, and the next checks. The throttling bit alone does not identify heat as the cause; use the power and cooling checks before buying a cooler or changing clock settings.

Read CPU temperature without vcgencmd

Linux exposes thermal sensors through sysfs. First identify the zone rather than assuming zone zero always names the CPU:

1
2
3
4
5
6
# List sensor types on this kernel.
for zone in /sys/class/thermal/thermal_zone*; do
    [ -r "$zone/type" ] || continue
    printf '%s: ' "$zone"
    cat "$zone/type"
done

Look for the SoC zone, such as cpu-thermal on the Pi 4 used here. Substitute its path if it differs from the example:

1
2
3
# The sysfs value is millidegrees Celsius.
cat /sys/class/thermal/thermal_zone0/temp
awk '{printf "%.1f C\n", $1/1000}' /sys/class/thermal/thermal_zone0/temp

On the example Pi 4, that zone returned 37972, which is 37.972°C before rounding. The Linux thermal sysfs reference defines the type and units. The Linux and firmware paths sample separately, so small differences are expected.

A missing zone is an unavailable reading, not 0°C. Do not substitute zero in a monitoring script when reading fails.

Fix temperature reading errors

vcgencmd: command not found

Check the OS and executable before installing anything:

1
2
3
cat /etc/os-release
command -v vcgencmd
apt-cache policy raspi-utils

On current Raspberry Pi OS, check the candidate from the configured Raspberry Pi repositories, then install the utility package if needed:

1
2
3
sudo apt update
sudo apt install raspi-utils
vcgencmd measure_temp

The Raspberry Pi utils project includes vcgencmd. Package names and firmware access can differ on Ubuntu, Armbian, older images, or inside a container. Do not add unrelated distribution repositories just to obtain this command; use the kernel sensor interface when available.

Permission denied or firmware access fails

Try the read once with sudo to distinguish permissions from an absent interface:

sudo vcgencmd measure_temp

If that succeeds while the ordinary command fails, inspect the image's device/group configuration. If it also fails, check whether you are on the Pi host, not a container lacking host devices. Do not grant a container privileged access merely to obtain a temperature reading.

thermal_zone0/temp: No such file or directory

List zones and their types as shown above. If no suitable sensor exists, inspect the host kernel and OS support. Renaming a file or inventing a fallback temperature will not restore the sensor.

Temperature appears stuck or implausible

Confirm sensor type and units, then compare a fresh firmware reading with a fresh sysfs sample. Observe during your ordinary workload; cached dashboard values are not necessarily current readings. Do not disable thermal protection to test a sensor.

Raspberry Pi 5 fan not spinning

For the official Pi 5 fan solutions, stopping below the activation threshold can be expected. The documented fan behaviour is:

Rising temperature Fan speed
Below 50°C Stopped
50°C 30%
60°C 50%
67.5°C 70%
75°C 100%

Cooling uses hysteresis, so falling-temperature switching differs from the rising thresholds. Custom configuration can alter this curve. Fan activation and CPU throttling are different controls.

If the fan remains stopped during a warm workload, shut down and disconnect power before checking its connector, cable routing, and mounting. Use the official fan connector for its supported fan; arbitrary GPIO wiring is not a replacement instruction for Pi 5 cooling.

Check airflow and thermal-pad contact according to the cooler's instructions. A fan improves neither a bad power supply nor an unrelated storage bottleneck.

A local temperature warning without extra packages

Download temperature_check.py. It reads one confirmed thermal-zone file and prints JSON. It requires Python 3, not root, a webhook, a database, or a Python package installation.

1
2
3
python3 temperature_check.py --warning 75
# Select another zone only after identifying its type.
python3 temperature_check.py --temperature-file /sys/class/thermal/thermal_zone1/temp --warning 75

Exit status is 0 below the selected warning, 1 at or above it, and 2 when a read or argument fails. Non-numeric, NaN, and infinite readings are rejected rather than treated as a cool board.

Example output for a synthetic 78°C reading:

{"status": "warning", "temperature_c": 78.0, "warning_c": 75.0}

The warning is local output, not an email, SMS, or chat notification. If you integrate it into monitoring, add cooldown, recovery notifications, and a separate sensor-error alert. Treating every nonzero status as “too hot” would confuse read failures with real warnings.

For systemd integration, explicitly account for status 1 being an intentional warning. Do not attach automatic restarts or shutdown actions to an unreviewed exit code.

The fixture tests exercise conversion, threshold boundaries, custom settings, missing files, and invalid input:

# Keep the checker and test file in the same directory.
python3 test_temperature_check.py

They run on a regular computer; they are not validation of a Pi sensor or cooler.

Log a short cooling check

A bounded foreground capture avoids a root service and an unbounded log:

# Capture 30 samples at two-second intervals in a new local file.
sample_log=$(mktemp ./pi-thermal-XXXXXX.log)
for sample in $(seq 1 30); do
    date -Iseconds
    vcgencmd measure_temp
    vcgencmd get_throttled
    vcgencmd measure_clock arm
    sleep 2
done > "$sample_log"
printf 'Saved readings to %s\n' "$sample_log"

Run your ordinary application while capturing. Use less "$sample_log" to compare the samples around the slowdown. If a command fails, its error appears in the terminal, so check for missing readings before interpreting the file. Repeat with the same workload and one cooling change. For ongoing monitoring, see the Prometheus and Grafana guide.

Check temperature, flags, and clock together before changing cooling or frequency policy.

Donate