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:
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:
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:
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:
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:
Look for the SoC zone, such as cpu-thermal on the Pi 4 used here. Substitute its path if it differs from the example:
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:
On current Raspberry Pi OS, check the candidate from the configured Raspberry Pi repositories, then install the utility package if needed:
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:
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.
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:
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:
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:
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.
Related guides¶
- Learn to send data with UDP in C++: a separate loopback exercise using a text message, not a network-enabled version of the temperature checker above. Start with the Network course setup if you need the compiler and socket tools.
- CPU clock commands, governors, and low-frequency diagnosis
- Decode throttling flags and diagnose undervoltage
- Choose a performance fix from the actual bottleneck
- Repeatable power and temperature measurement procedure
- Estimate energy cost from measured watts
Check temperature, flags, and clock together before changing cooling or frequency policy.