Raspberry Pi Sensors

bash file

CPUtemp=$(cat /sys/class/thermal/thermal_zone0/temp)
echo "CPU temp=$CPUtemp'mC"
GPUtemp=$(/opt/vc/bin/vcgencmd measure_temp)
echo "GPU $GPUtemp"
echo "CPU freq=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq)"
echo "CPU maxf=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq)"
echo "GPU RAM $(/opt/vc/bin/vcgencmd get_config sdram_freq)"
echo "GPU Video core $(/opt/vc/bin/vcgencmd get_config core_freq)"
echo "GPU 3D core $(/opt/vc/bin/vcgencmd get_config gpu_freq)"

to steadily view run

watch -n1 file.bash

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.