From owner-acpi-jp@jp.FreeBSD.org Tue Dec 16 06:26:49 2003
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id hBFLQns26847;
	Tue, 16 Dec 2003 06:26:49 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with ESMTP/inet id hBFLQmM26842
	for <acpi-jp@jp.freebsd.org>; Tue, 16 Dec 2003 06:26:48 +0900 (JST)
	(envelope-from jhb@FreeBSD.org)
Received: (qmail 1811 invoked from network); 15 Dec 2003 21:26:46 -0000
Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63])
          (envelope-sender <jhb@FreeBSD.org>)
          by mail1.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP
          for <arch@freebsd.org>; 15 Dec 2003 21:26:46 -0000
Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1])
	by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id hBFLQiM0008267;
	Mon, 15 Dec 2003 16:26:44 -0500 (EST)
	(envelope-from jhb@FreeBSD.org)
Message-ID: <XFMail.20031215162646.jhb@FreeBSD.org>
X-Mailer: XFMail 1.5.4 on FreeBSD
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
In-Reply-To: <20031213130351.N59162@root.org>
From: John Baldwin <jhb@freebsd.org>
To: Nate Lawson <nate@root.org>
Cc: acpi-jp@jp.FreeBSD.org, arch@freebsd.org
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Mon, 15 Dec 2003 16:26:46 -0500
X-Sequence: acpi-jp 2910
Subject: [acpi-jp 2910] RE: Power profile script
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: jhb@FreeBSD.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+031215


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@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
