X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_bin%2Fcpu-screen.sh;fp=usr_bin%2Fcpu-screen.sh;h=0000000000000000000000000000000000000000;hb=68552116672d8462fb256c0771888a4654c3687d;hp=da43a5ead01433ce3889bec0fedfc70bc85d1309;hpb=80e422b789147a8706e450722c6e45bd42b3a5d1;p=grml-scripts.git diff --git a/usr_bin/cpu-screen.sh b/usr_bin/cpu-screen.sh deleted file mode 100755 index da43a5e..0000000 --- a/usr_bin/cpu-screen.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# Filename: cpu-screen -# Purpose: script for use inside GNU screen -# Authors: grml-team (grml.org), (c) Michael Prokop -# Bug-Reports: see http://grml.org/bugs/ -# License: This file is licensed under the GPL v2. -################################################################################ - -if [ -r /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq ] ; then - TMP=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq` && \ - CUR="`echo "scale=0; $TMP/1000" | bc -l` / " -else - [ -z "$CUR" ] && CUR='' -fi - -if ! [ -d /proc ] ; then - echo "no /proc" && exit -else - if [ -r /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq ] ; then - TMP=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq` && \ - MHZ=`echo "scale=0; $TMP/1000" | bc -l` - else - MHZ=$(grep 'cpu MHz' /proc/cpuinfo | sed 's/.*: // ; s/\..*//') - fi - MULT=$(echo "$MHZ" | wc -l) - if [ $MULT -gt 1 ] ; then - RESULT=$(echo "$MHZ" | head -1) - echo "$CUR${RESULT}*${MULT}" - else - echo "$CUR$MHZ" - fi -fi - -## END OF FILE #################################################################