Back to home page

OSCL-LXR

 
 

    


0001 .TH TURBOSTAT 8
0002 .SH NAME
0003 turbostat \- Report processor frequency and idle statistics
0004 .SH SYNOPSIS
0005 .ft B
0006 .B turbostat
0007 .RB [ Options ]
0008 .RB command
0009 .br
0010 .B turbostat
0011 .RB [ Options ]
0012 .RB [ "\--interval seconds" ]
0013 .SH DESCRIPTION
0014 \fBturbostat \fP reports processor topology, frequency,
0015 idle power-state statistics, temperature and power on X86 processors.
0016 There are two ways to invoke turbostat.
0017 The first method is to supply a
0018 \fBcommand\fP, which is forked and statistics are printed
0019 in one-shot upon its completion.
0020 The second method is to omit the command,
0021 and turbostat displays statistics every 5 seconds interval.
0022 The 5-second interval can be changed using the --interval option.
0023 .PP
0024 Some information is not available on older processors.
0025 .SS Options
0026 Options can be specified with a single or double '-', and only as much of the option
0027 name as necessary to disambiguate it from others is necessary.  Note that options are case-sensitive.
0028 .PP
0029 \fB--add attributes\fP add column with counter having specified 'attributes'.  The 'location' attribute is required, all others are optional.
0030 .nf
0031         location: {\fBmsrDDD\fP | \fBmsr0xXXX\fP | \fB/sys/path...\fP}
0032                 msrDDD is a decimal offset, eg. msr16
0033                 msr0xXXX is a hex offset, eg. msr0x10
0034                 /sys/path... is an absolute path to a sysfs attribute
0035 
0036         scope: {\fBcpu\fP | \fBcore\fP | \fBpackage\fP}
0037                 sample and print the counter for every cpu, core, or package.
0038                 default: cpu
0039 
0040         size: {\fBu32\fP | \fBu64\fP }
0041                 MSRs are read as 64-bits, u32 truncates the displayed value to 32-bits.
0042                 default: u64
0043 
0044         format: {\fBraw\fP | \fBdelta\fP | \fBpercent\fP}
0045                 'raw' shows the MSR contents in hex.
0046                 'delta' shows the difference in values during the measurement interval.
0047                 'percent' shows the delta as a percentage of the cycles elapsed.
0048                 default: delta
0049 
0050         name: "name_string"
0051                 Any string that does not match a key-word above is used
0052                 as the column header.
0053 .fi
0054 .PP
0055 \fB--cpu cpu-set\fP limit output to system summary plus the specified cpu-set.  If cpu-set is the string "core", then the system summary plus the first CPU in each core are printed -- eg. subsequent HT siblings are not printed.  Or if cpu-set is the string "package", then the system summary plus the first CPU in each package is printed.  Otherwise, the system summary plus the specified set of CPUs are printed.  The cpu-set is ordered from low to high, comma delimited with ".." and "-" permitted to denote a range. eg. 1,2,8,14..17,21-44
0056 .PP
0057 \fB--hide column\fP do not show the specified built-in columns.  May be invoked multiple times, or with a comma-separated list of column names.
0058 .PP
0059 \fB--enable column\fP show the specified built-in columns, which are otherwise disabled, by default.  Currently the only built-in counters disabled by default are "usec", "Time_Of_Day_Seconds", "APIC" and "X2APIC".
0060 The column name "all" can be used to enable all disabled-by-default built-in counters.
0061 .PP
0062 \fB--show column\fP show only the specified built-in columns.  May be invoked multiple times, or with a comma-separated list of column names.
0063 .PP
0064 \fB--show CATEGORY --hide CATEGORY\fP  Show and hide also accept a single CATEGORY of columns: "all", "topology", "idle", "frequency", "power", "sysfs", "other".
0065 .PP
0066 \fB--Dump\fP displays the raw counter values.
0067 .PP
0068 \fB--quiet\fP Do not decode and print the system configuration header information.
0069 .PP
0070 \fB--interval seconds\fP overrides the default 5.0 second measurement interval.
0071 .PP
0072 \fB--num_iterations num\fP number of the measurement iterations.
0073 .PP
0074 \fB--out output_file\fP turbostat output is written to the specified output_file.
0075 The file is truncated if it already exists, and it is created if it does not exist.
0076 .PP
0077 \fB--help\fP displays usage for the most common parameters.
0078 .PP
0079 \fB--Joules\fP displays energy in Joules, rather than dividing Joules by time to print power in Watts.
0080 .PP
0081 \fB--list\fP display column header names available for use by --show and --hide, then exit.
0082 .PP
0083 \fB--Summary\fP limits output to a 1-line System Summary for each interval.
0084 .PP
0085 \fB--TCC temperature\fP sets the Thermal Control Circuit temperature for systems which do not export that value.  This is used for making sense of the Digital Thermal Sensor outputs, as they return degrees Celsius below the TCC activation temperature.
0086 .PP
0087 \fB--version\fP displays the version.
0088 .PP
0089 The \fBcommand\fP parameter forks \fBcommand\fP, and upon its exit,
0090 displays the statistics gathered since it was forked.
0091 .PP
0092 .SH ROW DESCRIPTIONS
0093 The system configuration dump (if --quiet is not used) is followed by statistics.  The first row of the statistics labels the content of each column (below).  The second row of statistics is the system summary line.  The system summary line has a '-' in the columns for the Package, Core, and CPU.  The contents of the system summary line depends on the type of column.  Columns that count items (eg. IRQ) show the sum across all CPUs in the system.  Columns that show a percentage show the average across all CPUs in the system.  Columns that dump raw MSR values simply show 0 in the summary.  After the system summary row, each row describes a specific Package/Core/CPU.  Note that if the --cpu parameter is used to limit which specific CPUs are displayed, turbostat will still collect statistics for all CPUs in the system and will still show the system summary for all CPUs in the system.
0094 .SH COLUMN DESCRIPTIONS
0095 .PP
0096 \fBusec\fP For each CPU, the number of microseconds elapsed during counter collection, including thread migration -- if any.  This counter is disabled by default, and is enabled with "--enable usec", or --debug.  On the summary row, usec refers to the total elapsed time to collect the counters on all cpus.
0097 .PP
0098 \fBTime_Of_Day_Seconds\fP For each CPU, the gettimeofday(2) value (seconds.subsec since Epoch) when the counters ending the measurement interval were collected.  This column is disabled by default, and can be enabled with "--enable Time_Of_Day_Seconds" or "--debug".  On the summary row, Time_Of_Day_Seconds refers to the timestamp following collection of counters on the last CPU.
0099 .PP
0100 \fBCore\fP processor core number.  Note that multiple CPUs per core indicate support for Intel(R) Hyper-Threading Technology (HT).
0101 .PP
0102 \fBCPU\fP Linux CPU (logical processor) number.  Yes, it is okay that on many systems the CPUs are not listed in numerical order -- for efficiency reasons, turbostat runs in topology order, so HT siblings appear together.
0103 .PP
0104 \fBPackage\fP processor package number -- not present on systems with a single processor package.
0105 .PP
0106 \fBAvg_MHz\fP number of cycles executed divided by time elapsed.  Note that this includes idle-time when 0 instructions are executed.
0107 .PP
0108 \fBBusy%\fP percent of the measurement interval that the CPU executes instructions, aka. % of time in "C0" state.
0109 .PP
0110 \fBBzy_MHz\fP average clock rate while the CPU was not idle (ie. in "c0" state).
0111 .PP
0112 \fBTSC_MHz\fP average MHz that the TSC ran during the entire interval.
0113 .PP
0114 \fBIRQ\fP The number of interrupts serviced by that CPU during the measurement interval.  The system total line is the sum of interrupts serviced across all CPUs.  turbostat parses /proc/interrupts to generate this summary.
0115 .PP
0116 \fBSMI\fP The number of System Management Interrupts  serviced CPU during the measurement interval.  While this counter is actually per-CPU, SMI are triggered on all processors, so the number should be the same for all CPUs.
0117 .PP
0118 \fBC1, C2, C3...\fP The number times Linux requested the C1, C2, C3 idle state during the measurement interval.  The system summary line shows the sum for all CPUs.  These are C-state names as exported in /sys/devices/system/cpu/cpu*/cpuidle/state*/name.  While their names are generic, their attributes are processor specific. They the system description section of output shows what MWAIT sub-states they are mapped to on each system.
0119 .PP
0120 \fBC1%, C2%, C3%\fP The residency percentage that Linux requested C1, C2, C3....  The system summary is the average of all CPUs in the system.  Note that these are software, reflecting what was requested.  The hardware counters reflect what was actually achieved.
0121 .PP
0122 \fBCPU%c1, CPU%c3, CPU%c6, CPU%c7\fP show the percentage residency in hardware core idle states.  These numbers are from hardware residency counters.
0123 .PP
0124 \fBCoreTmp\fP Degrees Celsius reported by the per-core Digital Thermal Sensor.
0125 .PP
0126 \fBPkgTmp\fP Degrees Celsius reported by the per-package Package Thermal Monitor.
0127 .PP
0128 \fBGFX%rc6\fP The percentage of time the GPU is in the "render C6" state, rc6, during the measurement interval. From /sys/class/drm/card0/power/rc6_residency_ms.
0129 .PP
0130 \fBGFXMHz\fP Instantaneous snapshot of what sysfs presents at the end of the measurement interval. From /sys/class/graphics/fb0/device/drm/card0/gt_cur_freq_mhz.
0131 .PP
0132 \fBPkg%pc2, Pkg%pc3, Pkg%pc6, Pkg%pc7\fP percentage residency in hardware package idle states.  These numbers are from hardware residency counters.
0133 .PP
0134 \fBPkgWatt\fP Watts consumed by the whole package.
0135 .PP
0136 \fBCorWatt\fP Watts consumed by the core part of the package.
0137 .PP
0138 \fBGFXWatt\fP Watts consumed by the Graphics part of the package -- available only on client processors.
0139 .PP
0140 \fBRAMWatt\fP Watts consumed by the DRAM DIMMS -- available only on server processors.
0141 .PP
0142 \fBPKG_%\fP percent of the interval that RAPL throttling was active on the Package.  Note that the system summary is the sum of the package throttling time, and thus may be higher than 100% on a multi-package system.  Note that the meaning of this field is model specific.  For example, some hardware increments this counter when RAPL responds to thermal limits, but does not increment this counter when RAPL responds to power limits.  Comparing PkgWatt and PkgTmp to system limits is necessary.
0143 .PP
0144 \fBRAM_%\fP percent of the interval that RAPL throttling was active on DRAM.
0145 .PP
0146 \fBUncMHz\fP uncore MHz, instantaneous sample.
0147 .SH TOO MUCH INFORMATION EXAMPLE
0148 By default, turbostat dumps all possible information -- a system configuration header, followed by columns for all counters.
0149 This is ideal for remote debugging, use the "--out" option to save everything to a text file, and get that file to the expert helping you debug.
0150 .PP
0151 When you are not interested in all that information, and there are several ways to see only what you want.  First the "--quiet" option will skip the configuration information, and turbostat will show only the counter columns.  Second, you can reduce the columns with the "--hide" and "--show" options.  If you use the "--show" option, then turbostat will show only the columns you list.  If you use the "--hide" option, turbostat will show all columns, except the ones you list.
0152 .PP
0153 To find out what columns are available for --show and --hide, the "--list" option is available.  Usually, the CATEGORY names above are used to refer to groups of counters.  Also, for convenience, the special string "sysfs" can be used to refer to all of the sysfs C-state counters at once:
0154 .PP
0155 .nf
0156 sudo ./turbostat --show sysfs --quiet sleep 10
0157 10.003837 sec
0158         C1      C1E     C3      C6      C7s     C1%     C1E%    C3%     C6%     C7s%
0159         4       21      2       2       459     0.14    0.82    0.00    0.00    98.93
0160         1       17      2       2       130     0.00    0.02    0.00    0.00    99.80
0161         0       0       0       0       31      0.00    0.00    0.00    0.00    99.95
0162         2       1       0       0       52      1.14    6.49    0.00    0.00    92.21
0163         1       2       0       0       52      0.00    0.08    0.00    0.00    99.86
0164         0       0       0       0       71      0.00    0.00    0.00    0.00    99.89
0165         0       0       0       0       25      0.00    0.00    0.00    0.00    99.96
0166         0       0       0       0       74      0.00    0.00    0.00    0.00    99.94
0167         0       1       0       0       24      0.00    0.00    0.00    0.00    99.84
0168 .fi
0169 .PP
0170 .SH ONE SHOT COMMAND EXAMPLE
0171 If turbostat is invoked with a command, it will fork that command
0172 and output the statistics gathered after the command exits.
0173 In this case, turbostat output goes to stderr, by default.
0174 Output can instead be saved to a file using the --out option.
0175 In this example, the "sleep 10" command is forked, and turbostat waits for it to complete before saving all statistics into "ts.out".  Note that "sleep 10" is not part of turbostat, but is simply an example of a command that turbostat can fork.  The "ts.out" file is what you want to edit in a very wide window, paste into a spreadsheet, or attach to a bugzilla entry.
0176 
0177 .nf
0178 [root@hsw]# ./turbostat -o ts.out sleep 10
0179 [root@hsw]#
0180 .fi
0181 
0182 .SH PERIODIC INTERVAL EXAMPLE
0183 Without a command to fork, turbostat displays statistics ever 5 seconds.
0184 Periodic output goes to stdout, by default, unless --out is used to specify an output file.
0185 The 5-second interval can be changed with the "-i sec" option.
0186 .nf
0187 sudo turbostat --quiet --show CPU,frequency
0188         Core    CPU     Avg_MHz Busy%   Bzy_MHz TSC_MHz CPU%c7  UncMhz
0189         -       -       524     12.48   4198    3096    74.53   3800
0190         0       0       4       0.09    4081    3096    98.88   3800
0191         0       4       1       0.02    4063    3096
0192         1       1       2       0.06    4063    3096    99.60
0193         1       5       2       0.05    4070    3096
0194         2       2       4178    99.52   4199    3096    0.00
0195         2       6       3       0.08    4159    3096
0196         3       3       1       0.04    4046    3096    99.66
0197         3       7       0       0.01    3989    3096
0198         Core    CPU     Avg_MHz Busy%   Bzy_MHz TSC_MHz CPU%c7  UncMhz
0199         -       -       525     12.52   4198    3096    74.54   3800
0200         0       0       4       0.10    4051    3096    99.49   3800
0201         0       4       2       0.04    3993    3096
0202         1       1       3       0.07    4054    3096    99.56
0203         1       5       4       0.10    4018    3096
0204         2       2       4178    99.51   4199    3096    0.00
0205         2       6       4       0.09    4143    3096
0206         3       3       2       0.06    4026    3096    99.10
0207         3       7       7       0.17    4074    3096
0208 .fi
0209 This example also shows the use of the --show option to show only the desired columns.
0210 
0211 .SH SYSTEM CONFIGURATION INFORMATION EXAMPLE
0212 
0213 By default, turbostat always dumps system configuration information
0214 before taking measurements.  In the example above, "--quiet" is used
0215 to suppress that output.  Here is an example of the configuration information:
0216 .nf
0217 turbostat version 2022.04.16 - Len Brown <lenb@kernel.org>
0218 Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.18.0-rc6-00001-ge6891250e3b5 ...
0219 CPUID(0): GenuineIntel 0x16 CPUID levels
0220 CPUID(1): family:model:stepping 0x6:9e:9 (6:158:9) microcode 0xea
0221 CPUID(0x80000000): max_extended_levels: 0x80000008
0222 CPUID(1): SSE3 MONITOR - EIST TM2 TSC MSR ACPI-TM HT TM
0223 CPUID(6): APERF, TURBO, DTS, PTM, HWP, HWPnotify, HWPwindow, HWPepp, No-HWPpkg, EPB
0224 cpu7: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT PREFETCH TURBO)
0225 CPUID(7): SGX
0226 cpu7: MSR_IA32_FEATURE_CONTROL: 0x00000005 (Locked )
0227 CPUID(0x15): eax_crystal: 2 ebx_tsc: 258 ecx_crystal_hz: 0
0228 TSC: 3096 MHz (24000000 Hz * 258 / 2 / 1000000)
0229 CPUID(0x16): base_mhz: 3100 max_mhz: 4200 bus_mhz: 100
0230 cpu7: MSR_MISC_PWR_MGMT: 0x00401cc0 (ENable-EIST_Coordination DISable-EPB DISable-OOB)
0231 RAPL: 5825 sec. Joule Counter Range, at 45 Watts
0232 cpu7: MSR_PLATFORM_INFO: 0x80839f1011f00
0233 8 * 100.0 = 800.0 MHz max efficiency frequency
0234 31 * 100.0 = 3100.0 MHz base frequency
0235 cpu7: MSR_IA32_POWER_CTL: 0x002c005d (C1E auto-promotion: DISabled)
0236 cpu7: MSR_TURBO_RATIO_LIMIT: 0x2728292a
0237 39 * 100.0 = 3900.0 MHz max turbo 4 active cores
0238 40 * 100.0 = 4000.0 MHz max turbo 3 active cores
0239 41 * 100.0 = 4100.0 MHz max turbo 2 active cores
0240 42 * 100.0 = 4200.0 MHz max turbo 1 active cores
0241 cpu7: MSR_CONFIG_TDP_NOMINAL: 0x0000001f (base_ratio=31)
0242 cpu7: MSR_CONFIG_TDP_LEVEL_1: 0x00000000 ()
0243 cpu7: MSR_CONFIG_TDP_LEVEL_2: 0x00000000 ()
0244 cpu7: MSR_CONFIG_TDP_CONTROL: 0x80000000 ( lock=1)
0245 cpu7: MSR_TURBO_ACTIVATION_RATIO: 0x00000000 (MAX_NON_TURBO_RATIO=0 lock=0)
0246 cpu7: MSR_PKG_CST_CONFIG_CONTROL: 0x1e008008 (UNdemote-C3, UNdemote-C1, demote-C3, demote-C1, locked, pkg-cstate-limit=8 (unlimited))
0247 Uncore Frequency pkg0 die0: 800 - 3900 MHz (800 - 3900 MHz)
0248 /dev/cpu_dma_latency: 2000000000 usec (default)
0249 current_driver: intel_idle
0250 current_governor: menu
0251 current_governor_ro: menu
0252 cpu7: POLL: CPUIDLE CORE POLL IDLE
0253 cpu7: C1: MWAIT 0x00
0254 cpu7: C1E: MWAIT 0x01
0255 cpu7: C3: MWAIT 0x10
0256 cpu7: C6: MWAIT 0x20
0257 cpu7: C7s: MWAIT 0x33
0258 cpu7: C8: MWAIT 0x40
0259 cpu7: C9: MWAIT 0x50
0260 cpu7: C10: MWAIT 0x60
0261 cpu7: cpufreq driver: intel_pstate
0262 cpu7: cpufreq governor: performance
0263 cpufreq intel_pstate no_turbo: 0
0264 cpu7: MSR_MISC_FEATURE_CONTROL: 0x00000000 (L2-Prefetch L2-Prefetch-pair L1-Prefetch L1-IP-Prefetch)
0265 cpu0: MSR_PM_ENABLE: 0x00000001 (HWP)
0266 cpu0: MSR_HWP_CAPABILITIES: 0x01101f53 (high 83 guar 31 eff 16 low 1)
0267 cpu0: MSR_HWP_REQUEST: 0x00005353 (min 83 max 83 des 0 epp 0x0 window 0x0 pkg 0x0)
0268 cpu0: MSR_HWP_INTERRUPT: 0x00000001 (EN_Guaranteed_Perf_Change, Dis_Excursion_Min)
0269 cpu0: MSR_HWP_STATUS: 0x00000004 (No-Guaranteed_Perf_Change, No-Excursion_Min)
0270 cpu0: EPB: 6 (balanced)
0271 cpu0: MSR_RAPL_POWER_UNIT: 0x000a0e03 (0.125000 Watts, 0.000061 Joules, 0.000977 sec.)
0272 cpu0: MSR_PKG_POWER_INFO: 0x00000168 (45 W TDP, RAPL 0 - 0 W, 0.000000 sec.)
0273 cpu0: MSR_PKG_POWER_LIMIT: 0x42820800218208 (UNlocked)
0274 cpu0: PKG Limit #1: ENabled (65.000 Watts, 64.000000 sec, clamp ENabled)
0275 cpu0: PKG Limit #2: ENabled (65.000 Watts, 0.002441* sec, clamp DISabled)
0276 cpu0: MSR_VR_CURRENT_CONFIG: 0x00000000
0277 cpu0: PKG Limit #4: 0.000000 Watts (UNlocked)
0278 cpu0: MSR_DRAM_POWER_LIMIT: 0x5400de00000000 (UNlocked)
0279 cpu0: DRAM Limit: DISabled (0.000 Watts, 0.000977 sec, clamp DISabled)
0280 cpu0: MSR_PP0_POLICY: 0
0281 cpu0: MSR_PP0_POWER_LIMIT: 0x00000000 (UNlocked)
0282 cpu0: Cores Limit: DISabled (0.000 Watts, 0.000977 sec, clamp DISabled)
0283 cpu0: MSR_PP1_POLICY: 0
0284 cpu0: MSR_PP1_POWER_LIMIT: 0x00000000 (UNlocked)
0285 cpu0: GFX Limit: DISabled (0.000 Watts, 0.000977 sec, clamp DISabled)
0286 cpu0: MSR_IA32_TEMPERATURE_TARGET: 0x00640000 (100 C) (100 default - 0 offset)
0287 cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x88200800 (68 C)
0288 cpu0: MSR_IA32_PACKAGE_THERM_INTERRUPT: 0x00000003 (100 C, 100 C)
0289 cpu7: MSR_PKGC3_IRTL: 0x0000884e (valid, 79872 ns)
0290 cpu7: MSR_PKGC6_IRTL: 0x00008876 (valid, 120832 ns)
0291 cpu7: MSR_PKGC7_IRTL: 0x00008894 (valid, 151552 ns)
0292 cpu7: MSR_PKGC8_IRTL: 0x000088fa (valid, 256000 ns)
0293 cpu7: MSR_PKGC9_IRTL: 0x0000894c (valid, 339968 ns)
0294 cpu7: MSR_PKGC10_IRTL: 0x00008bf2 (valid, 1034240 ns)
0295 .fi
0296 .PP
0297 The \fBmax efficiency\fP frequency, a.k.a. Low Frequency Mode, is the frequency
0298 available at the minimum package voltage.  The \fBTSC frequency\fP is the base
0299 frequency of the processor -- this should match the brand string
0300 in /proc/cpuinfo.  This base frequency
0301 should be sustainable on all CPUs indefinitely, given nominal power and cooling.
0302 The remaining rows show what maximum turbo frequency is possible
0303 depending on the number of idle cores.  Note that not all information is
0304 available on all processors.
0305 .SH ADD COUNTER EXAMPLE
0306 Here we limit turbostat to showing just the CPU number for cpu0 - cpu3.
0307 We add a counter showing the 32-bit raw value of MSR 0x199 (MSR_IA32_PERF_CTL),
0308 labeling it with the column header, "PRF_CTRL", and display it only once,
0309 afte the conclusion of a 0.1 second sleep.
0310 .nf
0311 sudo ./turbostat --quiet --cpu 0-3 --show CPU --add msr0x199,u32,raw,PRF_CTRL sleep .1
0312 0.101604 sec
0313 CPU       PRF_CTRL
0314 -       0x00000000
0315 0       0x00000c00
0316 1       0x00000800
0317 2       0x00000a00
0318 3       0x00000800
0319 
0320 .fi
0321 
0322 .SH INPUT
0323 
0324 For interval-mode, turbostat will immediately end the current interval
0325 when it sees a newline on standard input.
0326 turbostat will then start the next interval.
0327 Control-C will be send a SIGINT to turbostat,
0328 which will immediately abort the program with no further processing.
0329 .SH SIGNALS
0330 
0331 SIGINT will interrupt interval-mode.
0332 The end-of-interval data will be collected and displayed before turbostat exits.
0333 
0334 SIGUSR1 will end current interval,
0335 end-of-interval data will be collected and displayed before turbostat
0336 starts a new interval.
0337 .SH NOTES
0338 
0339 .B "turbostat "
0340 must be run as root.
0341 Alternatively, non-root users can be enabled to run turbostat this way:
0342 
0343 # setcap cap_sys_admin,cap_sys_rawio,cap_sys_nice=+ep ./turbostat
0344 
0345 # chmod +r /dev/cpu/*/msr
0346 
0347 .B "turbostat "
0348 reads hardware counters, but doesn't write them.
0349 So it will not interfere with the OS or other programs, including
0350 multiple invocations of itself.
0351 
0352 \fBturbostat \fP
0353 may work poorly on Linux-2.6.20 through 2.6.29,
0354 as \fBacpi-cpufreq \fPperiodically cleared the APERF and MPERF MSRs
0355 in those kernels.
0356 
0357 AVG_MHz = APERF_delta/measurement_interval.  This is the actual
0358 number of elapsed cycles divided by the entire sample interval --
0359 including idle time.  Note that this calculation is resilient
0360 to systems lacking a non-stop TSC.
0361 
0362 TSC_MHz = TSC_delta/measurement_interval.
0363 On a system with an invariant TSC, this value will be constant
0364 and will closely match the base frequency value shown
0365 in the brand string in /proc/cpuinfo.  On a system where
0366 the TSC stops in idle, TSC_MHz will drop
0367 below the processor's base frequency.
0368 
0369 Busy% = MPERF_delta/TSC_delta
0370 
0371 Bzy_MHz = TSC_delta/APERF_delta/MPERF_delta/measurement_interval
0372 
0373 Note that these calculations depend on TSC_delta, so they
0374 are not reliable during intervals when TSC_MHz is not running at the base frequency.
0375 
0376 Turbostat data collection is not atomic.
0377 Extremely short measurement intervals (much less than 1 second),
0378 or system activity that prevents turbostat from being able
0379 to run on all CPUS to quickly collect data, will result in
0380 inconsistent results.
0381 
0382 The APERF, MPERF MSRs are defined to count non-halted cycles.
0383 Although it is not guaranteed by the architecture, turbostat assumes
0384 that they count at TSC rate, which is true on all processors tested to date.
0385 
0386 .SH REFERENCES
0387 Volume 3B: System Programming Guide"
0388 https://www.intel.com/products/processor/manuals/
0389 
0390 .SH FILES
0391 .ta
0392 .nf
0393 /dev/cpu/*/msr
0394 .fi
0395 
0396 .SH "SEE ALSO"
0397 msr(4), vmstat(8)
0398 .PP
0399 .SH AUTHOR
0400 .nf
0401 Written by Len Brown <len.brown@intel.com>