Skip to content

Instantly share code, notes, and snippets.

@wormyrocks
Created October 29, 2020 21:24
Show Gist options
  • Save wormyrocks/54e6bbb715e8bbf59e310520e7c6f7f3 to your computer and use it in GitHub Desktop.
Save wormyrocks/54e6bbb715e8bbf59e310520e7c6f7f3 to your computer and use it in GitHub Desktop.
Monitors governor and vcgencmd stats from a running Raspberry Pi
#!/bin/bash
[[ -z $1 ]] && {
config=$(mktemp)
echo "config.txt options: " > $config
echo " $(vcgencmd get_config arm_freq)" >> $config
echo " $(vcgencmd get_config gpu_freq)" >> $config
echo " $(vcgencmd get_config gpu_freq_min)" >> $config
echo " $(vcgencmd get_config arm_freq_min)" >> $config
echo " $(vcgencmd get_config over_voltage)" >> $config
echo " $(vcgencmd get_config force_turbo)" >> $config
echo " $(vcgencmd get_config hevc_freq)" >> $config
watch -n 1 "$0 $config"
exit 0
}
cat $1
echo
echo "actual values:"
echo " "$(vcgencmd get_throttled)
echo " "voltage: $(vcgencmd measure_volts)
echo " "temperature: $(vcgencmd measure_temp)
echo " "hevc: $(vcgencmd measure_clock hevc)
echo " "arm: $(vcgencmd measure_clock arm)
governor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
echo " "governor: $governor
for f in /sys/devices/system/cpu/cpufreq/$governor/*; do
[ -e $f ] || continue
echo " "$(basename $f): $(cat $f)
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment