mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* bin/cpu-freq: drop "cat" and just use awk, don't printf twice,
performance improvements Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
5c11a0f790
commit
5fbdbed8fe
2 changed files with 5 additions and 6 deletions
|
@ -23,9 +23,7 @@ if [ "$1" = "--detail" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -r "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq" ]; then
|
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
|
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
|
fi
|
||||||
|
|
||||||
[ -n "$speed" ] && printf "\005{= cW}%sGHz\005{-} " $speed
|
|
||||||
|
|
5
debian/changelog
vendored
5
debian/changelog
vendored
|
@ -22,9 +22,10 @@ byobu (2.12) unreleased; urgency=low
|
||||||
bin/mem_available, byobu-status: drop grepping of status config file,
|
bin/mem_available, byobu-status: drop grepping of status config file,
|
||||||
source it instead, should improve performance
|
source it instead, should improve performance
|
||||||
* bin/reboot-required: don't exit 1 when a reboot is not required
|
* 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 <kirkland@ubuntu.com> Tue, 16 Jun 2009 18:27:35 -0500
|
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 16 Jun 2009 20:04:13 -0500
|
||||||
|
|
||||||
byobu (2.11-0ubuntu1) karmic; urgency=low
|
byobu (2.11-0ubuntu1) karmic; urgency=low
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue