X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=usr_bin%2Fcpu-screen.sh;fp=usr_bin%2Fcpu-screen.sh;h=0000000000000000000000000000000000000000;hb=8d0387394805aef9128475185d25bf42f24726e4;hp=da43a5ead01433ce3889bec0fedfc70bc85d1309;hpb=9df9caf71f9297d8bca1336e997dcad7819af8fc;p=grml-scripts-core.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 #################################################################