Gentoo Archives: gentoo-user

From: Alec Ten Harmsel <alec@××××××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Questions about cpu frequency utils scripting
Date: Tue, 21 Apr 2015 10:42:51
Message-Id: 5536299B.9080305@alectenharmsel.com
In Reply to: [gentoo-user] Questions about cpu frequency utils scripting by Walter Dnes
1 On 04/20/2015 09:05 PM, Walter Dnes wrote:
2 >
3 > Another item I'm missing is wildcarding directories in bash. The
4 > selected values are applied to the CPUs in a loop that goes like so...
5 >
6 > for core in /sys/devices/system/cpu/cpu[0-9]/
7 > do
8 > echo "${governor[${choiceminus}]}" > ${core}cpufreq/scaling_governor
9 > echo -n "CPU ${core:27:1} set to "
10 > cat ${core}cpufreq/scaling_governor
11 > done
12
13 for core in `ls /sys/devices/system/cpu/ | egrep "cpu[0-9]+"`
14
15 This works great on my desktop with 12 cores.
16
17 Alec

Replies

Subject Author
Re: [gentoo-user] Questions about cpu frequency utils scripting Walter Dnes <waltdnes@××××××××.org>