FreeBSD: script to manage processor speed

I have posted about this before <broken link>.

This time, it’s not one script, but many.

  • cpuctl is the script to be used when you want to switch the processor frequency. It goes anywhere you feel comfortable, I put it in ~/bin/.
  • cpucontrol is a wrapper script to sysctl. It’s required, since a common user is not allowed to change sysctl values. So, this script is run at startup with root permissions and works in the background. It reads from a file and issues the sysctl command. You control who can change the frequency by setting the aforementioned file’s permissions.
  • rc.d-cpucontrol is the rc.d file. It’s required to run cpucontrol on startup.
  • awesome-cpu is a widget for the awesome window manager. I use that. If you don’t, just delete it.

You can get all the files packed. SERVER DIED

Check the files, they have modifiable values. To install, issue something like:

cp cpuctl ~/bin/cpuctl
sudo cp cpucontrol /usr/local/bin/cpucontrol
sudo cp rc.d-cpucontrol /usr/local/etc/rc.d/cpucontrol
sudo echo 'cpucontrol_enable="YES"' >> /etc/rc.conf

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: