CPU FREQUENCY SCALING 1.3-2 - Ondemand (dynamic) - GUI

Miscellaneous tools
Message
Author
User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#81 Post by Karl Godt »

Code: Select all

#echo "`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies`" > /tmp/freq_tmp_max
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies |tr -s ' '|tr ' ' '\n'|sort -gr >/tmp/freq_tmp_max

> /tmp/freq_max
for i in `cat /tmp/freq_tmp_max`
do
echo "$i " | awk '{print "<item>"$1"</item>"}' >> /tmp/freq_max
done

#echo "`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies`" > /tmp/freq_tmp_min
sort -g /tmp/freq_tmp_max >/tmp/freq_tmp_min

#> /tmp/freq_min1
#for i in `cat /tmp/freq_tmp_min`
#do
#echo "$i " >> /tmp/freq_min1
#done
#sort -n "/tmp/freq_min1" >  /tmp/freq_min2

> /tmp/freq_min
for i in `cat /tmp/freq_tmp_min`
do
echo "$i " | awk '{print "<item>"$1"</item>"}' >> /tmp/freq_min
done

#echo "/tmp/freq_min" >  /tmp/freq_min
I have simplified the code of cpu_freq_1 script as above , to show the max as max and not min as the max in the max line of the gui at first popup .

Post Reply