View Single Post
eefo's Avatar
Posts: 1,444 | Thanked: 461 times | Joined on Dec 2010 @ pakistan
#14
awk -v var=$(awk '{sum+=$2}; END {print sum};' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state) '{arr[$3]=$2}{for (i in arr) {print $1/1000 " mhz " int(arr[i]*100/var)"%"}}' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state

this is the code to be used in queen beecon or DCEW for having freq on the desktop