From: Darrin Chandler Date: Wed, 13 Jan 2010 22:17:03 +0000 (+0000) Subject: Add CPU speed to baraction.sh X-Git-Tag: SCROTWM_0_9_30~72 X-Git-Url: https://code.delx.au/spectrwm/commitdiff_plain/3cd1a5315bccb23e07468e11cfafe1340ca347bf Add CPU speed to baraction.sh Diff from Joe Gidi --- 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 ));