]> code.delx.au - spectrwm/commitdiff
Add CPU speed to baraction.sh
authorDarrin Chandler <dwchandler@stilyagin.com>
Wed, 13 Jan 2010 22:17:03 +0000 (22:17 +0000)
committerDarrin Chandler <dwchandler@stilyagin.com>
Wed, 13 Jan 2010 22:17:03 +0000 (22:17 +0000)
Diff from Joe Gidi <joe@entropicblur.com>

baraction.sh

index 57f0e60e7eff90521afb64830bb3c7f03744d6b5..1248080e919afb7db05b537e008eb6b0e39737bf 100644 (file)
@@ -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 ));