[ltp] cpu MHz & TP-T30 & FC3
morpheus
linux-thinkpad@linux-thinkpad.org
Fri, 14 Jan 2005 12:44:55 -0500
Yes, but I would avoid using killall in this way, since if you have
other processes with "cpuspeed" in their names, they will also be sent
the signal. To be absolutely sure you're hitting the right process, do
a
# ps aux | grep cpuspeed
then, you can kill the specific pid, as follows:
# kill -s SIGNAL pid
Anyway, echoing to the files in /sys/devices/system/cpu/cpu0/cpufreq/ is
far more reliable than using killall and I recommend it, especially if
you are putting these into a script. Using killall in a script is
generally considered a Bad Idea (TM).
To set min frequency:
echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_frequency > \
> /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
To set maximum frequency:
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
These will work all the time under any circumstances, whereas killall
may not.
-m
On Fri, 2005-01-14 at 11:23 -0600, Satish Balay wrote:
> On Fri, 14 Jan 2005, morpheus wrote:
>
> > If you really want maximum CPU speed all the time, you can change the
> > governor to "performance".
> > # echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
> > Then if you
> > cat /proc/cpuinfo
> > It should be at maximum. However, as Christopher says, there's no need
> > to run at maximum since cpuspeed will automatically give you the cpu
> > power that you need according to load.
> > To return to speed-stepping, type:
> > # echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
>
> Or one could:
>
> killall -SIGUSR1 cupspeed #for max speed
> killall -SIGUSR2 cpuseepd #for min speed
>
> Perhaps this can be added to APM/ACPI scripts - which detect the 'AC'
> events.
>
> Satish