Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TIP] Script to manage cpufreq userspace governor
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
knopper
Tux's lil' helper
Tux's lil' helper


Joined: 20 Apr 2002
Posts: 106
Location: The Netherlands

PostPosted: Sat May 28, 2005 7:32 pm    Post subject: [TIP] Script to manage cpufreq userspace governor Reply with quote

I was toying a bit with this option in the kernel and I found out that the programs which are available currently are too complicated for what I need (I don't have a laptop with battery, ac and so on) or I couldn't get them to work with just the userspace governor.

So I decided to create a simple php script (cli-based) to take care of this, all it does is switch to the highest frequency available when under heavy load and switch to the lowest frequency available when under light load.

There's also an initscript which assumes you put the script in "/root", but you can change that manually of course.

Let me know what you think about it.

It's available for download here: http://www.knopper.tk/phpcpufreqd/

(You have to rename "cpufreqd.phps" to "cpufreqd.php" !!)
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2526
Location: Denmark

PostPosted: Sun May 29, 2005 3:08 pm    Post subject: Reply with quote

this does exactly that:

Code:

echo "ondemand" >> /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

_________________
linux: #232767
Back to top
View user's profile Send private message
knopper
Tux's lil' helper
Tux's lil' helper


Joined: 20 Apr 2002
Posts: 106
Location: The Netherlands

PostPosted: Sun May 29, 2005 4:29 pm    Post subject: Reply with quote

Is that a hidden governor since "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors" gives only "userspace" and I can't seem to find it in the kernel config?
Back to top
View user's profile Send private message
knopper
Tux's lil' helper
Tux's lil' helper


Joined: 20 Apr 2002
Posts: 106
Location: The Netherlands

PostPosted: Sun May 29, 2005 4:31 pm    Post subject: Reply with quote

Nevermind, I see it...:roll: :oops:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum