diff --git a/bin/cpu_freq b/bin/cpu_freq index 65b4d752..633278ab 100755 --- a/bin/cpu_freq +++ b/bin/cpu_freq @@ -23,9 +23,7 @@ if [ "$1" = "--detail" ]; then fi if [ -r "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq" ]; then - speed=`awk '{ printf "%.1f", $1 / 1000000 }' /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq` + awk '{ printf "\005{= cW}%.1fGHz\005{-} ", $1 / 1000000 }' /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq else - speed=`egrep -i -m 1 "^cpu MHz|^clock|^bogomips" /proc/cpuinfo | awk -F"[:.]" '{ printf "%.1f", $2 / 1000 }'` + egrep -i -m 1 "^cpu MHz|^clock|^bogomips" /proc/cpuinfo | awk -F"[:.]" '{ printf "\005{= cW}%.1fGHz\005{-} ", $2 / 1000 }' fi - -[ -n "$speed" ] && printf "\005{= cW}%sGHz\005{-} " $speed diff --git a/debian/changelog b/debian/changelog index be684187..a27b446c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,9 +22,10 @@ byobu (2.12) unreleased; urgency=low bin/mem_available, byobu-status: drop grepping of status config file, source it instead, should improve performance * bin/reboot-required: don't exit 1 when a reboot is not required - * bin/cpu-freq: drop "cat" and just use awk, performance improvement + * bin/cpu-freq: drop "cat" and just use awk, don't printf twice, + performance improvements - -- Dustin Kirkland Tue, 16 Jun 2009 18:27:35 -0500 + -- Dustin Kirkland Tue, 16 Jun 2009 20:04:13 -0500 byobu (2.11-0ubuntu1) karmic; urgency=low