Power profile script

John Baldwin jhb at FreeBSD.org
Mon Dec 15 13:26:48 PST 2003


On 13-Dec-2003 Nate Lawson wrote:
> I've implemented a script for changing power profiles in userland when you
> go on or off AC power.  The defaults will just change the CPU idle states
> to the lowest power ones when off AC power.  Throttling will stay at 100%.
> Of course, the user can override these in rc.conf.  In the future, other
> power profile features will be maintained by the same script.  You have to
> be running devd to use this.
> 
> The special values LOW and HIGH refer to the lowest and highest performing
> settings for a given sysctl.  So if a system has 8 throttling values, from
> 1 to 8, HIGH would be 8 and LOW would be 1.  You can also specify a
> particular value ("2") if you know what you want.
> 
> I'm mostly looking for style input on the /etc/power_profile script since
> I'm not familiar with our scripting guidelines.  Note that it's called
> from devd (or manually by the user) and is not an rc.d boot-time thing.

This looks really cool!  I do think Mike's suggestions on moving this to
/etc/rc.d/ and using functions from /etc/rc.subr might be a good thing
to do.

-- 

John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


More information about the freebsd-arch mailing list