Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   Scaling governor via sysctl? (http://www.linux-archive.org/debian-user/316178-scaling-governor-via-sysctl.html)

"Todd A. Jacobs" 01-28-2010 03:42 AM

Scaling governor via sysctl?
 
I'd like to set my scaling governor in /etc/sysctl.conf, rather than by
echoing a value to:

/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

However, I'm not finding a key for it via the sysctl utility. When I
run:

sysctl -a | fgrep -i cpu

I get nothing. Why can I write to a value in sysfs that can't be
accessed with sysctl? And more importantly, how am I supposed to do this
at boot without sysctl.conf?

--
"Oh, look: rocks!"
-- Doctor Who, "Destiny of the Daleks"


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

"Todd A. Jacobs" 01-28-2010 03:51 AM

Scaling governor via sysctl?
 
On Wed, Jan 27, 2010 at 08:42:13PM -0800, Todd A. Jacobs wrote:

> I get nothing. Why can I write to a value in sysfs that can't be
> accessed with sysctl? And more importantly, how am I supposed to do this
> at boot without sysctl.conf?

Two quick answers, but a remaining question. The default governor
can be set in /etc/default/cpufrequtils, and can be changed with:

sudo cpufreq-set -g ondemand

which probably just does the same thing as echoing to the right key in
sysfs.

However, I still don't understand why I can't set it with sysctl. What's
up with that?

--
"Oh, look: rocks!"
-- Doctor Who, "Destiny of the Daleks"


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

"Tilo Schwarz" 01-28-2010 08:19 PM

Scaling governor via sysctl?
 
On Thu, 28 Jan 2010 05:42:13 +0100, Todd A. Jacobs <nospam@codegnome.org>
wrote:



I'd like to set my scaling governor in /etc/sysctl.conf, rather than by
echoing a value to:

/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

However, I'm not finding a key for it via the sysctl utility. When I
run:

sysctl -a | fgrep -i cpu

I get nothing. Why can I write to a value in sysfs that can't be
accessed with sysctl? And more importantly, how am I supposed to do this
at boot without sysctl.conf?



I use sysfs.conf:

#grep demand /etc/sysfs.conf
devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand

--
Regards,

Tilo


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Carl Johnson 01-29-2010 09:26 PM

Scaling governor via sysctl?
 
"Tilo Schwarz" <tilo@tilo-schwarz.de> writes:

> On Thu, 28 Jan 2010 05:42:13 +0100, Todd A. Jacobs
> <nospam@codegnome.org> wrote:
>
>> I'd like to set my scaling governor in /etc/sysctl.conf, rather than by
>> echoing a value to:
>>
>> /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
>>
>> However, I'm not finding a key for it via the sysctl utility. When I
>> run:
>>
>> sysctl -a | fgrep -i cpu
>>
>> I get nothing. Why can I write to a value in sysfs that can't be
>> accessed with sysctl? And more importantly, how am I supposed to do this
>> at boot without sysctl.conf?
>>
>
> I use sysfs.conf:
>
> #grep demand /etc/sysfs.conf
> devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand

If you have the cpufrequtils package installed, then just edit
/etc/defaults/cpufrequtils to specify which you want at boot.
--
Carl Johnson carlj@peak.org


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

"Todd A. Jacobs" 01-30-2010 06:43 AM

Scaling governor via sysctl?
 
On Thu, Jan 28, 2010 at 10:19:27PM +0100, Tilo Schwarz wrote:

> I use sysfs.conf:

Thanks. I knew about sysctl.conf, but not sysfs.conf. I appreciate you
pointing that out!

--
"Oh, look: rocks!"
-- Doctor Who, "Destiny of the Daleks"


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

"Todd A. Jacobs" 01-30-2010 06:44 AM

Scaling governor via sysctl?
 
On Fri, Jan 29, 2010 at 02:26:40PM -0800, Carl Johnson wrote:

> If you have the cpufrequtils package installed, then just edit
> /etc/defaults/cpufrequtils to specify which you want at boot.

The /etc/defaults/cpufrequtils file over-rides the value (if any) in
/etc/sysfs.conf, but I think it's important to know that values can be
set there, too.

Thanks for the help.

--
"Oh, look: rocks!"
-- Doctor Who, "Destiny of the Daleks"


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

"Tilo Schwarz" 01-30-2010 12:54 PM

Scaling governor via sysctl?
 
On Fri, 29 Jan 2010 23:26:40 +0100, Carl Johnson <carlj@peak.org> wrote:


"Tilo Schwarz" <tilo@tilo-schwarz.de> writes:


On Thu, 28 Jan 2010 05:42:13 +0100, Todd A. Jacobs
<nospam@codegnome.org> wrote:


I'd like to set my scaling governor in /etc/sysctl.conf, rather than by
echoing a value to:

/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

However, I'm not finding a key for it via the sysctl utility. When I
run:

sysctl -a | fgrep -i cpu

I get nothing. Why can I write to a value in sysfs that can't be
accessed with sysctl? And more importantly, how am I supposed to do
this

at boot without sysctl.conf?



I use sysfs.conf:

#grep demand /etc/sysfs.conf
devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand


If you have the cpufrequtils package installed, then just edit
/etc/defaults/cpufrequtils to specify which you want at boot.


I don't have the cpufrequtils package installed.

--
Regards,

Tilo


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Carl Johnson 01-30-2010 04:35 PM

Scaling governor via sysctl?
 
"Tilo Schwarz" <tilo@tilo-schwarz.de> writes:

> On Fri, 29 Jan 2010 23:26:40 +0100, Carl Johnson <carlj@peak.org> wrote:
>
>> "Tilo Schwarz" <tilo@tilo-schwarz.de> writes:
>>
>>> On Thu, 28 Jan 2010 05:42:13 +0100, Todd A. Jacobs
>>> <nospam@codegnome.org> wrote:
>>>
>>>> I'd like to set my scaling governor in /etc/sysctl.conf, rather than by
>>>> echoing a value to:
>>>>
>>>> /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
>>>>
>>>> However, I'm not finding a key for it via the sysctl utility. When I
>>>> run:
>>>>
>>>> sysctl -a | fgrep -i cpu
>>>>
>>>> I get nothing. Why can I write to a value in sysfs that can't be
>>>> accessed with sysctl? And more importantly, how am I supposed to
>>>> do this
>>>> at boot without sysctl.conf?
>>>>
>>>
>>> I use sysfs.conf:
>>>
>>> #grep demand /etc/sysfs.conf
>>> devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand
>>
>> If you have the cpufrequtils package installed, then just edit
>> /etc/defaults/cpufrequtils to specify which you want at boot.
>
> I don't have the cpufrequtils package installed.

The cpufrequtils package adds programs which directly set
(cpufreq-set) and check (cpufreq-info) the frequency and drivers, so
you don't need to use the /sys filesystem manually.
--
Carl Johnson carlj@peak.org


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


All times are GMT. The time now is 07:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.