Skip to content

Instantly share code, notes, and snippets.

@dash17291
Created November 8, 2012 20:44
Show Gist options
  • Save dash17291/4041461 to your computer and use it in GitHub Desktop.
Save dash17291/4041461 to your computer and use it in GitHub Desktop.
#!/bin/bash
GOV=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`
MIN=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq`
MAX=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq`
echo "$GOV $MIN $MAX" | awk '{ printf "Governor: %s\nMin Freq: %4dMhz\nMax Freq: %4dMhz\n\n", $1, $2/1000, $3/1000 }'
while [ true ]; do
C=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq`
T=`cat /sys/class/thermal/thermal_zone0/temp`
echo "`date +%H:%M:%S` $C $T" | awk '{ printf "%s: %4dMhz, %-.2fC\n",$1, $2/1000,$3/1000 }'
sleep 2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment