#!/bin/bash # $Id: cpu_set_sh.txt 536 2006-09-20 21:06:37Z tas $ DIR=/sys/devices/system/cpu/cpu0/cpufreq/ GOV=scaling_governor MIN=scaling_min_freq MAX=scaling_max_freq SET=scaling_setspeed if [ "$1" = "max" ]; then GET=$MAX elif [ "$1" = "min" ]; then GET=$MIN else echo "Usage: $0 [ max | min ]" exit 1; fi sudo tee $DIR/$GOV > /dev/null < /dev/null grep clock /proc/cpuinfo