aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power/cpupower/man
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2011-03-30 10:30:11 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2011-07-29 12:35:36 -0400
commit7fe2f6399a84760a9af8896ac152728250f82adb (patch)
treefa4bf236359b8d6d9f8d6ff823ddd3e839da5768 /tools/power/cpupower/man
parent02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff)
cpupowerutils - cpufrequtils extended with quite some features
CPU power consumption vs performance tuning is no longer limited to CPU frequency switching anymore: deep sleep states, traditional dynamic frequency scaling and hidden turbo/boost frequencies are tied close together and depend on each other. The first two exist on different architectures like PPC, Itanium and ARM, the latter (so far) only on X86. On X86 the APU (CPU+GPU) will only run most efficiently if CPU and GPU has proper power management in place. Users and Developers want to have *one* tool to get an overview what their system supports and to monitor and debug CPU power management in detail. The tool should compile and work on as many architectures as possible. Once this tool stabilizes a bit, it is intended to replace the Intel-specific tools in tools/power/x86 Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'tools/power/cpupower/man')
-rw-r--r--tools/power/cpupower/man/cpupower-frequency-info.176
-rw-r--r--tools/power/cpupower/man/cpupower-frequency-set.154
-rw-r--r--tools/power/cpupower/man/cpupower-info.119
-rw-r--r--tools/power/cpupower/man/cpupower-monitor.1179
-rw-r--r--tools/power/cpupower/man/cpupower-set.1103
-rw-r--r--tools/power/cpupower/man/cpupower.172
6 files changed, 503 insertions, 0 deletions
diff --git a/tools/power/cpupower/man/cpupower-frequency-info.1 b/tools/power/cpupower/man/cpupower-frequency-info.1
new file mode 100644
index 000000000000..3194811d58f5
--- /dev/null
+++ b/tools/power/cpupower/man/cpupower-frequency-info.1
@@ -0,0 +1,76 @@
1.TH "cpufreq-info" "1" "0.1" "Mattia Dongili" ""
2.SH "NAME"
3.LP
4cpufreq\-info \- Utility to retrieve cpufreq kernel information
5.SH "SYNTAX"
6.LP
7cpufreq\-info [\fIoptions\fP]
8.SH "DESCRIPTION"
9.LP
10A small tool which prints out cpufreq information helpful to developers and interested users.
11.SH "OPTIONS"
12.LP
13.TP
14\fB\-e\fR \fB\-\-debug\fR
15Prints out debug information.
16.TP
17\fB\-f\fR \fB\-\-freq\fR
18Get frequency the CPU currently runs at, according to the cpufreq core.
19.TP
20\fB\-w\fR \fB\-\-hwfreq\fR
21Get frequency the CPU currently runs at, by reading it from hardware (only available to root).
22.TP
23\fB\-l\fR \fB\-\-hwlimits\fR
24Determine the minimum and maximum CPU frequency allowed.
25.TP
26\fB\-d\fR \fB\-\-driver\fR
27Determines the used cpufreq kernel driver.
28.TP
29\fB\-p\fR \fB\-\-policy\fR
30Gets the currently used cpufreq policy.
31.TP
32\fB\-g\fR \fB\-\-governors\fR
33Determines available cpufreq governors.
34.TP
35\fB\-a\fR \fB\-\-related\-cpus\fR
36Determines which CPUs run at the same hardware frequency.
37.TP
38\fB\-a\fR \fB\-\-affected\-cpus\fR
39Determines which CPUs need to have their frequency coordinated by software.
40.TP
41\fB\-s\fR \fB\-\-stats\fR
42Shows cpufreq statistics if available.
43.TP
44\fB\-y\fR \fB\-\-latency\fR
45Determines the maximum latency on CPU frequency changes.
46.TP
47\fB\-o\fR \fB\-\-proc\fR
48Prints out information like provided by the /proc/cpufreq interface in 2.4. and early 2.6. kernels.
49.TP
50\fB\-m\fR \fB\-\-human\fR
51human\-readable output for the \-f, \-w, \-s and \-y parameters.
52.TP
53\fB\-h\fR \fB\-\-help\fR
54Prints out the help screen.
55.SH "REMARKS"
56.LP
57By default only values of core zero are displayed. How to display settings of
58other cores is described in the cpupower(1) manpage in the \-\-cpu option section.
59.LP
60You can't specify more than one of the output specific options \-o \-e \-a \-g \-p \-d \-l \-w \-f \-y.
61.LP
62You also can't specify the \-o option combined with the \-c option.
63.SH "FILES"
64.nf
65\fI/sys/devices/system/cpu/cpu*/cpufreq/\fP
66\fI/proc/cpufreq\fP (deprecated)
67\fI/proc/sys/cpu/\fP (deprecated)
68.fi
69.SH "AUTHORS"
70.nf
71Dominik Brodowski <linux@brodo.de> \- author
72Mattia Dongili<malattia@gmail.com> \- first autolibtoolization
73.fi
74.SH "SEE ALSO"
75.LP
76cpupower\-frequency\-set(1), cpupower(1)
diff --git a/tools/power/cpupower/man/cpupower-frequency-set.1 b/tools/power/cpupower/man/cpupower-frequency-set.1
new file mode 100644
index 000000000000..26e3e13eee3b
--- /dev/null
+++ b/tools/power/cpupower/man/cpupower-frequency-set.1
@@ -0,0 +1,54 @@
1.TH "cpufreq-set" "1" "0.1" "Mattia Dongili" ""
2.SH "NAME"
3.LP
4cpufreq\-set \- A small tool which allows to modify cpufreq settings.
5.SH "SYNTAX"
6.LP
7cpufreq\-set [\fIoptions\fP]
8.SH "DESCRIPTION"
9.LP
10cpufreq\-set allows you to modify cpufreq settings without having to type e.g. "/sys/devices/system/cpu/cpu0/cpufreq/scaling_set_speed" all the time.
11.SH "OPTIONS"
12.LP
13.TP
14\fB\-d\fR \fB\-\-min\fR <FREQ>
15new minimum CPU frequency the governor may select.
16.TP
17\fB\-u\fR \fB\-\-max\fR <FREQ>
18new maximum CPU frequency the governor may select.
19.TP
20\fB\-g\fR \fB\-\-governor\fR <GOV>
21new cpufreq governor.
22.TP
23\fB\-f\fR \fB\-\-freq\fR <FREQ>
24specific frequency to be set. Requires userspace governor to be available and loaded.
25.TP
26\fB\-r\fR \fB\-\-related\fR
27modify all hardware-related CPUs at the same time
28.TP
29\fB\-h\fR \fB\-\-help\fR
30Prints out the help screen.
31.SH "REMARKS"
32.LP
33By default values are applied on all cores. How to modify single core
34configurations is described in the cpupower(1) manpage in the \-\-cpu option section.
35.LP
36The \-f FREQ, \-\-freq FREQ parameter cannot be combined with any other parameter.
37.LP
38FREQuencies can be passed in Hz, kHz (default), MHz, GHz, or THz by postfixing the value with the wanted unit name, without any space (frequency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000).
39.LP
40On Linux kernels up to 2.6.29, the \-r or \-\-related parameter is ignored.
41.SH "FILES"
42.nf
43\fI/sys/devices/system/cpu/cpu*/cpufreq/\fP
44\fI/proc/cpufreq\fP (deprecated)
45\fI/proc/sys/cpu/\fP (deprecated)
46.fi
47.SH "AUTHORS"
48.nf
49Dominik Brodowski <linux@brodo.de> \- author
50Mattia Dongili<malattia@gmail.com> \- first autolibtoolization
51.fi
52.SH "SEE ALSO"
53.LP
54cpupower\-frequency\-info(1), cpupower(1)
diff --git a/tools/power/cpupower/man/cpupower-info.1 b/tools/power/cpupower/man/cpupower-info.1
new file mode 100644
index 000000000000..58e21196f17f
--- /dev/null
+++ b/tools/power/cpupower/man/cpupower-info.1
@@ -0,0 +1,19 @@
1.TH CPUPOWER\-INFO "1" "22/02/2011" "" "cpupower Manual"
2.SH NAME
3cpupower\-info \- Shows processor power related kernel or hardware configurations
4.SH SYNOPSIS
5.ft B
6.B cpupower info [ \-b ] [ \-s ] [ \-m ]
7
8.SH DESCRIPTION
9\fBcpupower info \fP shows kernel configurations or processor hardware
10registers affecting processor power saving policies.
11
12Some options are platform wide, some affect single cores. By default values
13of core zero are displayed only. cpupower --cpu all cpuinfo will show the
14settings of all cores, see cpupower(1) how to choose specific cores.
15
16.SH "SEE ALSO"
17Options are described in detail in:
18
19cpupower(1), cpupower-set(1)
diff --git a/tools/power/cpupower/man/cpupower-monitor.1 b/tools/power/cpupower/man/cpupower-monitor.1
new file mode 100644
index 000000000000..d5cfa265c3d3
--- /dev/null
+++ b/tools/power/cpupower/man/cpupower-monitor.1
@@ -0,0 +1,179 @@
1.TH CPUPOWER\-MONITOR "1" "22/02/2011" "" "cpupower Manual"
2.SH NAME
3cpupower\-monitor \- Report processor frequency and idle statistics
4.SH SYNOPSIS
5.ft B
6.B cpupower monitor
7.RB "\-l"
8
9.B cpupower monitor
10.RB [ "\-m <mon1>," [ "<mon2>,..." ] ]
11.RB [ "\-i seconds" ]
12.br
13.B cpupower monitor
14.RB [ "\-m <mon1>," [ "<mon2>,..." ] ]
15.RB command
16.br
17.SH DESCRIPTION
18\fBcpupower-monitor \fP reports processor topology, frequency and idle power
19state statistics. Either \fBcommand\fP is forked and
20statistics are printed upon its completion, or statistics are printed periodically.
21
22\fBcpupower-monitor \fP implements independent processor sleep state and
23frequency counters. Some are retrieved from kernel statistics, some are
24directly reading out hardware registers. Use \-l to get an overview which are
25supported on your system.
26
27.SH Options
28.PP
29\-l
30.RS 4
31List available monitors on your system. Additional details about each monitor
32are shown:
33.RS 2
34.IP \(bu
35The name in quotation marks which can be passed to the \-m parameter.
36.IP \(bu
37The number of different counters the monitor supports in brackets.
38.IP \(bu
39The amount of time in seconds the counters might overflow, due to
40implementation constraints.
41.IP \(bu
42The name and a description of each counter and its processor hierarchy level
43coverage in square brackets:
44.RS 4
45.IP \(bu
46[T] \-> Thread
47.IP \(bu
48[C] \-> Core
49.IP \(bu
50[P] \-> Processor Package (Socket)
51.IP \(bu
52[M] \-> Machine/Platform wide counter
53.RE
54.RE
55.RE
56.PP
57\-m <mon1>,<mon2>,...
58.RS 4
59Only display specific monitors. Use the monitor string(s) provided by \-l option.
60.RE
61.PP
62\-i seconds
63.RS 4
64Measure intervall.
65.RE
66.PP
67command
68.RS 4
69Measure idle and frequency characteristics of an arbitrary command/workload.
70The executable \fBcommand\fP is forked and upon its exit, statistics gathered since it was
71forked are displayed.
72.RE
73.PP
74\-v
75.RS 4
76Increase verbosity if the binary was compiled with the DEBUG option set.
77.RE
78
79.SH MONITOR DESCRIPTIONS
80.SS "Idle_Stats"
81Shows statistics of the cpuidle kernel subsystem. Values are retrieved from
82/sys/devices/system/cpu/cpu*/cpuidle/state*/.
83The kernel updates these values every time an idle state is entered or
84left. Therefore there can be some inaccuracy when cores are in an idle
85state for some time when the measure starts or ends. In worst case it can happen
86that one core stayed in an idle state for the whole measure time and the idle
87state usage time as exported by the kernel did not get updated. In this case
88a state residency of 0 percent is shown while it was 100.
89
90.SS "Mperf"
91The name comes from the aperf/mperf (average and maximum) MSR registers used
92which are available on recent X86 processors. It shows the average frequency
93(including boost frequencies).
94The fact that on all recent hardware the mperf timer stops ticking in any idle
95state it is also used to show C0 (processor is active) and Cx (processor is in
96any sleep state) times. These counters do not have the inaccuracy restrictions
97the "Idle_Stats" counters may show.
98May work poorly on Linux-2.6.20 through 2.6.29, as the \fBacpi-cpufreq \fP
99kernel frequency driver periodically cleared aperf/mperf registers in those
100kernels.
101
102.SS "Nehalem" "SandyBridge"
103Intel Core and Package sleep state counters.
104Threads (hyperthreaded cores) may not be able to enter deeper core states if
105its sibling is utilized.
106Deepest package sleep states may in reality show up as machine/platform wide
107sleep states and can only be entered if all cores are idle. Look up Intel
108manuals (some are provided in the References section) for further details.
109
110.SS "Ontario" "Liano"
111AMD laptop and desktop processor (family 12h and 14h) sleep state counters.
112The registers are accessed via PCI and therefore can still be read out while
113cores have been offlined.
114
115There is one special counter: NBP1 (North Bridge P1).
116This one always returns 0 or 1, depending on whether the North Bridge P1
117power state got entered at least once during measure time.
118Being able to enter NBP1 state also depends on graphics power management.
119Therefore this counter can be used to verify whether the graphics' driver
120power management is working as expected.
121
122.SH EXAMPLES
123
124cpupower monitor -l" may show:
125.RS 4
126Monitor "Mperf" (3 states) \- Might overflow after 922000000 s
127
128 ...
129
130Monitor "Idle_Stats" (3 states) \- Might overflow after 4294967295 s
131
132 ...
133
134.RE
135cpupower monitor \-m "Idle_Stats,Mperf" scp /tmp/test /nfs/tmp
136
137Monitor the scp command, show both Mperf and Idle_Stats states counter
138statistics, but in exchanged order.
139
140
141
142.RE
143Be careful that the typical command to fully utilize one CPU by doing:
144
145cpupower monitor cat /dev/zero >/dev/null
146
147Does not work as expected, because the measured output is redirected to
148/dev/null. This could get workarounded by putting the line into an own, tiny
149shell script. Hit CTRL\-c to terminate the command and get the measure output
150displayed.
151
152.SH REFERENCES
153"BIOS and Kernel Developer’s Guide (BKDG) for AMD Family 14h Processors"
154http://support.amd.com/us/Processor_TechDocs/43170.pdf
155
156"Intel® Turbo Boost Technology
157in Intel® Core™ Microarchitecture (Nehalem) Based Processors"
158http://download.intel.com/design/processor/applnots/320354.pdf
159
160"Intel® 64 and IA-32 Architectures Software Developer's Manual
161Volume 3B: System Programming Guide"
162http://www.intel.com/products/processor/manuals
163
164.SH FILES
165.ta
166.nf
167/dev/cpu/*/msr
168/sys/devices/system/cpu/cpu*/cpuidle/state*/.
169.fi
170
171.SH "SEE ALSO"
172powertop(8), msr(4), vmstat(8)
173.PP
174.SH AUTHORS
175.nf
176Written by Thomas Renninger <trenn@suse.de>
177
178Nehalem, SandyBridge monitors and command passing
179based on turbostat.8 from Len Brown <len.brown@intel.com>
diff --git a/tools/power/cpupower/man/cpupower-set.1 b/tools/power/cpupower/man/cpupower-set.1
new file mode 100644
index 000000000000..c4954a9fe4e7
--- /dev/null
+++ b/tools/power/cpupower/man/cpupower-set.1
@@ -0,0 +1,103 @@
1.TH CPUPOWER\-SET "1" "22/02/2011" "" "cpupower Manual"
2.SH NAME
3cpupower\-set \- Set processor power related kernel or hardware configurations
4.SH SYNOPSIS
5.ft B
6.B cpupower set [ \-b VAL ] [ \-s VAL ] [ \-m VAL ]
7
8
9.SH DESCRIPTION
10\fBcpupower set \fP sets kernel configurations or directly accesses hardware
11registers affecting processor power saving policies.
12
13Some options are platform wide, some affect single cores. By default values
14are applied on all cores. How to modify single core configurations is
15described in the cpupower(1) manpage in the \-\-cpu option section. Whether an
16option affects the whole system or can be applied to individual cores is
17described in the Options sections.
18
19Use \fBcpupower info \fP to read out current settings and whether they are
20supported on the system at all.
21
22.SH Options
23.PP
24\-\-perf-bias, \-b
25.RS 4
26Sets a register on supported Intel processore which allows software to convey
27its policy for the relative importance of performance versus energy savings to
28the processor.
29
30The range of valid numbers is 0-15, where 0 is maximum
31performance and 15 is maximum energy efficiency.
32
33The processor uses this information in model-specific ways
34when it must select trade-offs between performance and
35energy efficiency.
36
37This policy hint does not supersede Processor Performance states
38(P-states) or CPU Idle power states (C-states), but allows
39software to have influence where it would otherwise be unable
40to express a preference.
41
42For example, this setting may tell the hardware how
43aggressively or conservatively to control frequency
44in the "turbo range" above the explicitly OS-controlled
45P-state frequency range. It may also tell the hardware
46how aggressively it should enter the OS requested C-states.
47
48This option can be applied to individual cores only via the \-\-cpu option,
49cpupower(1).
50
51Setting the performance bias value on one CPU can modify the setting on
52related CPUs as well (for example all CPUs on one socket), because of
53hardware restrictions.
54Use \fBcpupower -c all info -b\fP to verify.
55
56This options needs the msr kernel driver (CONFIG_X86_MSR) loaded.
57.RE
58.PP
59\-\-sched\-mc, \-m [ VAL ]
60.RE
61\-\-sched\-smt, \-s [ VAL ]
62.RS 4
63\-\-sched\-mc utilizes cores in one processor package/socket first before
64processes are scheduled to other processor packages/sockets.
65
66\-\-sched\-smt utilizes thread siblings of one processor core first before
67processes are scheduled to other cores.
68
69The impact on power consumption and performance (positiv or negativ) heavily
70depends on processor support for deep sleep states, frequency scaling and
71frequency boost modes and their dependencies between other thread siblings
72and processor cores.
73
74Taken over from kernel documentation:
75
76Adjust the kernel's multi-core scheduler support.
77
78Possible values are:
79.RS 2
800 - No power saving load balance (default value)
81
821 - Fill one thread/core/package first for long running threads
83
842 - Also bias task wakeups to semi-idle cpu package for power
85savings
86.RE
87
88sched_mc_power_savings is dependent upon SCHED_MC, which is
89itself architecture dependent.
90
91sched_smt_power_savings is dependent upon SCHED_SMT, which
92is itself architecture dependent.
93
94The two files are independent of each other. It is possible
95that one file may be present without the other.
96
97.SH "SEE ALSO"
98cpupower-info(1), cpupower-monitor(1), powertop(1)
99.PP
100.SH AUTHORS
101.nf
102\-\-perf\-bias parts written by Len Brown <len.brown@intel.com>
103Thomas Renninger <trenn@suse.de>
diff --git a/tools/power/cpupower/man/cpupower.1 b/tools/power/cpupower/man/cpupower.1
new file mode 100644
index 000000000000..78c20feab85c
--- /dev/null
+++ b/tools/power/cpupower/man/cpupower.1
@@ -0,0 +1,72 @@
1.TH CPUPOWER "1" "07/03/2011" "" "cpupower Manual"
2.SH NAME
3cpupower \- Shows and sets processor power related values
4.SH SYNOPSIS
5.ft B
6.B cpupower [ \-c cpulist ] subcommand [ARGS]
7
8.B cpupower \-v|\-\-version
9
10.B cpupower \-h|\-\-help
11
12.SH DESCRIPTION
13\fBcpupower \fP is a collection of tools to examine and tune power saving
14related features of your processor.
15
16The manpages of the subcommands (cpupower\-<subcommand>(1)) provide detailed
17descriptions of supported features. Run \fBcpupower help\fP to get an overview
18of supported subcommands.
19
20.SH Options
21.PP
22\-\-help, \-h
23.RS 4
24Shows supported subcommands and general usage.
25.RE
26.PP
27\-\-cpu cpulist, \-c cpulist
28.RS 4
29Only show or set values for specific cores.
30This option is not supported by all subcommands, details can be found in the
31manpages of the subcommands.
32
33Some subcommands access all cores (typically the *\-set commands), some only
34the first core (typically the *\-info commands) by default.
35
36The syntax for <cpulist> is based on how the kernel exports CPU bitmasks via
37sysfs files. Some examples:
38.RS 4
39.TP 16
40Input
41Equivalent to
42.TP
43all
44all cores
45.TP
460\-3
470,1,2,3
48.TP
490\-7:2
500,2,4,6
51.TP
521,3,5-7
531,3,5,6,7
54.TP
550\-3:2,8\-15:4
560,2,8,12
57.RE
58.RE
59.PP
60\-\-version, \-v
61.RS 4
62Print the package name and version number.
63
64.SH "SEE ALSO"
65cpupower-set(1), cpupower-info(1), cpupower-idle(1),
66cpupower-frequency-set(1), cpupower-frequency-info(1), cpupower-monitor(1),
67powertop(1)
68.PP
69.SH AUTHORS
70.nf
71\-\-perf\-bias parts written by Len Brown <len.brown@intel.com>
72Thomas Renninger <trenn@suse.de>