🛠 Surveillance thermique et fréquence CPU
Objectives
Instrument the thermal behavior of the RK3568B2: read kernel sensors, monitor the frequency of the four Cortex-A55 cores (up to 2 GHz) under load, and verify that the stock heatsink performs adequately (CNX test: slightly above 50 °C at 35 °C ambient, 1.3 W idle, 4.5 W under heavy load).
Hardware
- ODROID-M1 with its stock heatsink (123 × 100 × 19 mm), closed or open case
- Armbian or DietPi; optional cpufrequtils package; stress-ng for load generation
- Optional external probe or hot chamber to reproduce 35 °C ambient conditions
Complete code
#!/usr/bin/env bash
# monitoring-odroidm1.sh — température + fréquence, 1 ligne / 2 s
while true; do
for z in /sys/class/thermal/thermal_zone*; do
t=$(($(cat $z/temp) / 1000))
echo -n "$(cat $z/type): ${t}C "
done
for c in /sys/devices/system/cpu/cpufreq/policy*; do
f=$(($(cat $c/scaling_cur_freq) / 1000))
echo -n "cpu$(( ${c##*policy} )): ${f}MHz "
done
echo "| load: $(cut -d' ' -f1 /proc/loadavg)"
sleep 2
done
# Dans un second terminal : montée en charge et throttling
sudo apt-get install -y stress-ng
stress-ng --cpu 4 --timeout 300
Expected verification
At idle, a few degrees above ambient; under load on 4 cores, the temperature rises and then stabilizes around 50-60 °C with the stock heatsink. scaling_cur_freq remains close to 2000 MHz as long as the throttling threshold is not reached.
Common errors
- Reading /sys/class/thermal without dividing by 1000: the value is in millidegrees.
- Comparing without a heatsink: CNX figures assume the stock heatsink is installed.
- Confusing policy0 (all cores, single A55 cluster) with four independent settings.
- Poorly sized case: the heatsink extends beyond the board (123 × 100 mm), and some cases crush it.
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash