From 3cd1a5315bccb23e07468e11cfafe1340ca347bf Mon Sep 17 00:00:00 2001 From: Darrin Chandler Date: Wed, 13 Jan 2010 22:17:03 +0000 Subject: [PATCH] Add CPU speed to baraction.sh Diff from Joe Gidi --- baraction.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/baraction.sh b/baraction.sh index 57f0e60..1248080 100644 --- a/baraction.sh +++ b/baraction.sh @@ -76,6 +76,11 @@ print_apm() { fi } +print_cpuspeed() { + CPU_SPEED=`/sbin/sysctl hw.cpuspeed | cut -d "=" -f2` + echo -n " CPU speed: $CPU_SPEED MHz" +} + while :; do # instead of sleeping, use iostat as the update timer. # cache the output of apm(8), no need to call that every second. @@ -93,6 +98,7 @@ while :; do # print_mem $MEM print_cpu $REPLY print_apm $APM_DATA + print_cpuspeed echo "" fi I=$(( ${I} + 1 )); -- 2.39.2