aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power/x86/turbostat/turbostat.8
diff options
context:
space:
mode:
Diffstat (limited to 'tools/power/x86/turbostat/turbostat.8')
-rw-r--r--tools/power/x86/turbostat/turbostat.866
1 files changed, 45 insertions, 21 deletions
diff --git a/tools/power/x86/turbostat/turbostat.8 b/tools/power/x86/turbostat/turbostat.8
index 56bfb523c5bb..9b950699e63d 100644
--- a/tools/power/x86/turbostat/turbostat.8
+++ b/tools/power/x86/turbostat/turbostat.8
@@ -12,16 +12,16 @@ turbostat \- Report processor frequency and idle statistics
12.RB [ "\-i interval_sec" ] 12.RB [ "\-i interval_sec" ]
13.SH DESCRIPTION 13.SH DESCRIPTION
14\fBturbostat \fP reports processor topology, frequency, 14\fBturbostat \fP reports processor topology, frequency,
15idle power-state statistics, temperature and power on modern X86 processors. 15idle power-state statistics, temperature and power on X86 processors.
16Either \fBcommand\fP is forked and statistics are printed 16There are two ways to invoke turbostat.
17upon its completion, or statistics are printed periodically. 17The first method is to supply a
18 18\fBcommand\fP, which is forked and statistics are printed
19\fBturbostat \fP 19upon its completion.
20must be run on root, and 20The second method is to omit the command,
21minimally requires that the processor 21and turbodstat will print statistics every 5 seconds.
22supports an "invariant" TSC, plus the APERF and MPERF MSRs. 22The 5-second interval can changed using the -i option.
23Additional information is reported depending on hardware counter support. 23
24 24Some information is not availalbe on older processors.
25.SS Options 25.SS Options
26The \fB-p\fP option limits output to the 1st thread in 1st core of each package. 26The \fB-p\fP option limits output to the 1st thread in 1st core of each package.
27.PP 27.PP
@@ -130,12 +130,13 @@ cpu3: MSR_IA32_THERM_STATUS: 0x884e0000 (27 C +/- 1)
130 ... 130 ...
131.fi 131.fi
132The \fBmax efficiency\fP frequency, a.k.a. Low Frequency Mode, is the frequency 132The \fBmax efficiency\fP frequency, a.k.a. Low Frequency Mode, is the frequency
133available at the minimum package voltage. The \fBTSC frequency\fP is the nominal 133available at the minimum package voltage. The \fBTSC frequency\fP is the base
134maximum frequency of the processor if turbo-mode were not available. This frequency 134frequency of the processor -- this should match the brand string
135in /proc/cpuinfo. This base frequency
135should be sustainable on all CPUs indefinitely, given nominal power and cooling. 136should be sustainable on all CPUs indefinitely, given nominal power and cooling.
136The remaining rows show what maximum turbo frequency is possible 137The remaining rows show what maximum turbo frequency is possible
137depending on the number of idle cores. Note that this information is 138depending on the number of idle cores. Note that not all information is
138not available on all processors. 139available on all processors.
139.SH FORK EXAMPLE 140.SH FORK EXAMPLE
140If turbostat is invoked with a command, it will fork that command 141If turbostat is invoked with a command, it will fork that command
141and output the statistics gathered when the command exits. 142and output the statistics gathered when the command exits.
@@ -176,6 +177,11 @@ not including any non-busy idle time.
176 177
177.B "turbostat " 178.B "turbostat "
178must be run as root. 179must be run as root.
180Alternatively, non-root users can be enabled to run turbostat this way:
181
182# setcap cap_sys_rawio=ep ./turbostat
183
184# chmod +r /dev/cpu/*/msr
179 185
180.B "turbostat " 186.B "turbostat "
181reads hardware counters, but doesn't write them. 187reads hardware counters, but doesn't write them.
@@ -184,15 +190,33 @@ multiple invocations of itself.
184 190
185\fBturbostat \fP 191\fBturbostat \fP
186may work poorly on Linux-2.6.20 through 2.6.29, 192may work poorly on Linux-2.6.20 through 2.6.29,
187as \fBacpi-cpufreq \fPperiodically cleared the APERF and MPERF 193as \fBacpi-cpufreq \fPperiodically cleared the APERF and MPERF MSRs
188in those kernels. 194in those kernels.
189 195
190If the TSC column does not make sense, then 196AVG_MHz = APERF_delta/measurement_interval. This is the actual
191the other numbers will also make no sense. 197number of elapsed cycles divided by the entire sample interval --
192Turbostat is lightweight, and its data collection is not atomic. 198including idle time. Note that this calculation is resiliant
193These issues are usually caused by an extremely short measurement 199to systems lacking a non-stop TSC.
194interval (much less than 1 second), or system activity that prevents 200
195turbostat from being able to run on all CPUS to quickly collect data. 201TSC_MHz = TSC_delta/measurement_interval.
202On a system with an invariant TSC, this value will be constant
203and will closely match the base frequency value shown
204in the brand string in /proc/cpuinfo. On a system where
205the TSC stops in idle, TSC_MHz will drop
206below the processor's base frequency.
207
208%Busy = MPERF_delta/TSC_delta
209
210Bzy_MHz = TSC_delta/APERF_delta/MPERF_delta/measurement_interval
211
212Note that these calculations depend on TSC_delta, so they
213are not reliable during intervals when TSC_MHz is not running at the base frequency.
214
215Turbostat data collection is not atomic.
216Extremely short measurement intervals (much less than 1 second),
217or system activity that prevents turbostat from being able
218to run on all CPUS to quickly collect data, will result in
219inconsistent results.
196 220
197The APERF, MPERF MSRs are defined to count non-halted cycles. 221The APERF, MPERF MSRs are defined to count non-halted cycles.
198Although it is not guaranteed by the architecture, turbostat assumes 222Although it is not guaranteed by the architecture, turbostat assumes