aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power/x86/turbostat/turbostat.8 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-07-28tools/power turbostat: update turbostat.8Len Brown1-76/+124
Update turbostat.8 to reflect new uncore frequency output (UncMHz) Also, refresh examples. Signed-off-by: Len Brown <len.brown@intel.com>
2022-04-16tools/power turbostat: be more useful as non-rootLen Brown1-1/+1
Don't exit if used this way: sudo setcap cap_sys_nice,cap_sys_rawio=+ep ./turbostat sudo chmod +r /dev/cpu/*/msr ./turbostat note: cap_sys_admin is now also needed for the perf IPC counter: sudo setcap cap_sys_admin,cap_sys_nice,cap_sys_rawio=+ep ./turbostat Reported-by: Artem S. Tashkinov <aros@gmx.com> Reported-by: Toby Broom <tbroom@outlook.com> Signed-off-by: Len Brown <len.brown@intel.com>
2021-05-04tools/power turbostat: Support "turbostat --hide idle"Len Brown1-2/+4
As idle, in particular, can have many columns on some machines... Make it easy to ignore them all at once. Signed-off-by: Len Brown <len.brown@intel.com>
2020-09-03tools/power turbostat: Replace HTTP links with HTTPS ones: TURBOSTAT UTILITYAlexander A. Klimov1-1/+1
Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de> Signed-off-by: Len Brown <len.brown@intel.com>
2018-07-17tools/power turbostat: Update turbostat(8) RAPL throttling column descriptionLen Brown1-2/+2
Explain that this column may increment for some throttling causes, and may not increment for others. Signed-off-by: Len Brown <len.brown@intel.com>
2018-06-20tools/power turbostat: add optional APIC X2APIC columnsLen Brown1-1/+1
Add APIC and X2APIC columns to the topology section. They are disabled-by-default -- enable like so: --debug or --enable APIC,X2APIC Signed-off-by: Len Brown <len.brown@intel.com>
2018-06-01tools/power turbostat: if --num_iterations, print for specific number of iterationsChen Yu1-0/+2
There's a use case during test to only print specific round of iterations if --num_iterations is specified, for example, with this patch applied: turbostat -i 5 -n 4 will capture 4 samples with 5 seconds interval. [lenb: renamed to --num_iterations from --iterations] Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Chen Yu <yu.c.chen@intel.com> Reviewed-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2018-06-01tools/power turbostat: end current interval upon newline inputLen Brown1-0/+7
In turbostat interval mode, a newline typed on standard input will now conclude the current interval. Data will immediately be collected and printed for that interval, and the next interval will be started. This is similar to the recently added SIGUSR1 feature. But that is for use by programs, while this is for interactive use. Signed-off-by: Len Brown <len.brown@intel.com>
2018-06-01tools/power turbostat: on SIGUSR1: sample, print and continueLen Brown1-0/+4
Interval-mode turbostat now catches and discards SIGUSR1. Thus, SIGUSR1 can be used to tell turbostat to cut short the current measurement interval. Turbostat will then start the next measurement interval using the regular interval length. This can be used to give turbostat variable intervals. Invoke turbostat with --interval LARGE_NUMBER_SEC and have a program that has permission to send it a SIGUSR1 always before LARGE_NUMBER_SEC expires. It may also be useful to use "--enable Time_Of_Day_Seconds" to observe the actual interval length. Signed-off-by: Len Brown <len.brown@intel.com>
2018-06-01tools/power turbostat: on SIGINT: sample, print and exitLen Brown1-0/+4
When running in interval-mode, catch interrupts and print a final data record before exiting. Signed-off-by: Len Brown <len.brown@intel.com>
2018-06-01tools/power turbostat: add --enable Time_Of_Day_SecondsLen Brown1-2/+7
Add a Time_Of_Day_Seconds column showing when measurement for each row was completed. Units are [sec.subsec] since Epoch, as reported by gettimeofday(2). While useful to correlate turbostat output with other tools, this built-in column is disabled, by default. Add the "--enable" option to enable such disabled-by-default built-in columns: "--enable Time_Of_Day_Seconds" "--enable usec" "--enable all", will enable all disabled-by-defauilt built-in counters. When "--debug" is used, all disabled-by-default columns are enabled, unless explicitly skipped using "--hide" Signed-off-by: Len Brown <len.brown@intel.com>
2017-04-12tools/power turbostat: turbostat.8 add missing column definitionsDoug Smythies1-0/+2
Add GFX%rc6 and GFXMHz to the column descriptions section of the turbostat man page. Signed-off-by: Doug Smythies <dsmythies@telus.net> Signed-off-by: Len Brown <len.brown@intel.com>
2017-03-01tools/power turbostat: support "--hide C1" etc.Len Brown1-1/+1
Originally, the only way to hide the sysfs C-state statistics columns was with "--hide sysfs". This was because we process "--hide" before we probe for those columns. hack --hide to remember deferred hide requests, and apply them when sysfs is probed. "--hide sysfs" is still available as short-hand to refer to the entire group of counters. The down-side of this change is that we no longer error check for bogus --hide column names. But the user will quickly figure that out if a column they mean to hide is still there... Signed-off-by: Len Brown <len.brown@intel.com>
2017-03-01tools/power turbostat: move --Package and --processor into the --cpu optionLen Brown1-5/+1
--Package is now "--cpu package", which will display just the 1st CPU in each package --processor is not "--cpu core" which will display just the 1st CPU in each core Signed-off-by: Len Brown <len.brown@intel.com>
2017-03-01tools/power turbostat: turbostat.8 updateLen Brown1-98/+140
update examples to show recently updated features. In particular --add --show --hide --cpu --list Signed-off-by: Len Brown <len.brown@intel.com>
2017-03-01tools/power turbostat: add --cpu parameterLen Brown1-0/+2
With the --cpu parameter, turbostat prints only lines for the specified set of CPUs: sudo ./turbostat --quiet --show Core,CPU --cpu 0,1,3..5,6-7 Core CPU - - 0 0 0 4 1 1 1 5 2 6 3 3 3 7 Signed-off-by: Len Brown <len.brown@intel.com>
2017-03-01tools/power turbostat: print sysfs C-state statsLen Brown1-2/+2
When turbostat shows % of time in a CPU idle power state, it has always been showing information from underlying hardware residency counters. While this reflects what the hardware is doing, and is thus useful for understanding the hardware, it doesn't directly tell us what Linux requested -- which is useful for tuning Linux itself. Here we add columns to turbostat to show the Linux cpuidle sub-system statistics: /sys/devices/system/cpu/cpu*/cpuidle/state*/* The first group of columns are the "usage", which is the number of times software requested that C-state in the measurement interval. eg C1 below. The second group of columns are the "time", which is the percentage of the measurement interval time that software has requested the specified C-state. eg C1% below. These software counters can be compared to the underlying hardware residency counters (eg CPU%c1 CPU%c3 CPU%c6 CPU%c7) to compare what sofware requested to what the hardware delivered. These sysfs attributes are discovered when turbostat starts, rather than being "built in". So the --show and --hide parameters do not know about these dynamic column names. However "--show sysfs" and "--hide sysfs" act on the entire group of columns: turbostat --show sysfs ... cpu4: POLL: CPUIDLE CORE POLL IDLE cpu4: C1: MWAIT 0x00 cpu4: C1E: MWAIT 0x01 cpu4: C3: MWAIT 0x10 cpu4: C6: MWAIT 0x20 cpu4: C7s: MWAIT 0x32 ... C1 C1E C3 C6 C7s C1% C1E% C3% C6% C7s% 3 6 5 1 188 0.00 0.02 0.00 0.00 99.93 0 6 5 0 58 0.00 0.16 0.02 0.00 99.70 0 0 0 0 9 0.00 0.00 0.00 0.00 99.96 0 0 0 1 24 0.00 0.00 0.00 0.02 99.93 0 0 0 0 9 0.00 0.00 0.00 0.00 99.97 0 0 0 0 32 0.00 0.00 0.00 0.00 99.96 0 0 0 0 7 0.00 0.00 0.00 0.00 99.98 2 0 0 0 36 0.00 0.00 0.00 0.00 99.97 1 0 0 0 13 0.00 0.00 0.00 0.00 99.98 Signed-off-by: Len Brown <len.brown@intel.com>
2017-03-01tools/power turbostat: print system config, unless --quietLen Brown1-6/+1
Some users want turbostat to tell them everything, by default. Some users want turbostat to be quiet, by default. I find that I'm in the 1st camp, and so I've never liked needing to type the --debug parameter to decode the system configuration. So here we change the default and print the system configuration, by default. (The --debug option is now un-documented, though it does still exist for debugging turbostat internals) When you do not want to see the system configuration header, use the new "--quiet" option. Signed-off-by: Len Brown <len.brown@intel.com>
2017-02-25tools/power turbostat: Add --show and --hide parametersLen Brown1-0/+4
Add the "--show" and "--hide" cmdline parameters. By default, turbostat shows all columns. turbostat --hide counter_list will continue showing all columns, except for those listed. turbostat --show counter_list will show _only_ the listed columns These features work for built-in counters, and have no effect on columns added with the --add parameter. Signed-off-by: Len Brown <len.brown@intel.com>
2016-12-24tools/power turbostat: remove obsolete -M, -m, -C, -c optionsLen Brown1-8/+0
The new --add option has replaced the -M, -m, -C, -c options Eg. -M 0x10 is now --add msr0x10,raw -m 0x10 is now --add msr0x10,raw,u32 -C 0x10 is now --add msr0x10,delta -c 0x10 is now --add msr0x10,delta,u32 The --add option can be repeated to add any number of counters, while the previous options were limited to adding one of each type. In addition, the --add option can accept a column label, and can also display a counter as a percentage of elapsed cycles. Eg. --add msr0x3fe,core,percent,MY_CC3 Signed-off-by: Len Brown <len.brown@intel.com>
2016-12-24tools/power turbostat: Make extensible via the --add parameterLen Brown1-0/+22
Create the "--add" parameter. This can be used to teach an existing turbostat binary about any number of any type of counter. turbostat(8) details the syntax for --add. Signed-off-by: Len Brown <len.brown@intel.com>
2016-07-07tools/power turbostat: Replace MSR_NHM_TURBO_RATIO_LIMITSrinivas Pandruvada1-1/+1
Replace MSR_NHM_TURBO_RATIO_LIMIT with MSR_TURBO_RATIO_LIMIT. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-03-13tools/power turbostat: add --out option for saving output in a fileLen Brown1-4/+10
By default... Turbostat --debug gconfiguration info goes to stderr. In FORK mode, turbostat statistics go to stderr. In PERIODIC mode, turbostat statistics go to stdout. These defaults do not change, but an option "--out file" will send all output above only to the specified file. Signed-off-by: Len Brown <len.brown@intel.com>
2016-03-13tools/power turbostat: re-name "%Busy" field to "Busy%"Len Brown1-8/+8
some tools processing turbostat output have difficulty with items that begin with %... Reported-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2016-03-13tools/power turbostat: allow sub-sec intervalsLen Brown1-1/+1
turbostat -i interval_sec will sample and display statistics every interval_sec. interval_sec used to be a whole number of seconds, but now we accept a decimal, as small as 0.001 sec (1 ms). Signed-off-by: Len Brown <len.brown@intel.com>
2015-06-03tools/power turbostat: update turbostat(8)Len Brown1-5/+0
Remove reference to the original Nehalem Turbo white paper, since it has moved, and these mechanisms have now long since been documented in the Software Developer's Manual. Reported-by: Jeremie Lagraviere <jeremie@simula.no> Signed-off-by: Len Brown <len.brown@intel.com>
2015-04-13tools/power turbostat: simplify default outputLen Brown1-60/+78
Casual turbostat users generally just want to know MHz. So by default, just print enough information to make sense of MHz. All the other configuration data and columns for C-states and temperature etc, are printed with the --debug option. Signed-off-by: Len Brown <len.brown@intel.com>
2015-02-10tools/power turbostat: update parameters, documentationLen Brown1-29/+39
Long format options added, though the short ones should still work. eg. the new "--Counter 0x10" is the same as the old "-C 0x10" Note this Incompatibility: Old: -v displayed verbose debug output New: -v and --version simpaly display version Additional parameters: -d and --debug display verbose debug output -h and --help display a help message Updated turbosat.8 man page accordingly. Signed-off-by: Len Brown <len.brown@intel.com>
2015-02-09tools/power turbostat: relax dependency on APERF_MSRLen Brown1-21/+45
While turbostat is significantly less useful on systems with no APERF_MSR, it seems more friendly to run on such systems and report what we can, rather than refusing to run. Update man page to reflect recent changes. Signed-off-by: Len Brown <len.brown@intel.com>
2014-03-05tools/power turbostat: simplify output, add Avg_MHzLen Brown1-79/+48
Use 8 columns for each number ouput. We don't fit into 80 columns on most machines, so keep the format simple. Print frequency in MHz instead of GHz. We've got 8 columns now, so use them to show low frequency in a more natural unit. Many users didn't understand what %c0 meant, so re-name it to be %Busy. Add Avg_MHz column, which is the frequency that many users expect to see -- the total number of cycles executed over the measurement interval. People found the previous GHz to be confusing, since it was the speed only over the non-idle interval. That measurement has been re-named Bzy_MHz. Suggested-by: Dirk J. Brandewie Signed-off-by: Len Brown <len.brown@intel.com>
2013-02-13tools/power turbostat: display SMI count by defaultLen Brown1-20/+16
The SMI counter is popular -- so display it by default rather than requiring an option. What the heck, we've blown the 80 column budget on many systems already... Note that the value displayed is the delta during the measurement interval. The absolute value of the counter can still be seen with the generic 32-bit MSR option, ie. -m 0x34 Signed-off-by: Len Brown <len.brown@intel.com>
2012-11-30tools/power turbostat: v3.0: monitor Watts and TemperatureLen Brown1-36/+67
Show power in Watts and temperature in Celsius when hardware support is present. Intel's Sandy Bridge and Ivy Bridge processor generations support RAPL (Run-Time-Average-Power-Limiting). Per the Intel SDM (IntelĀ® 64 and IA-32 Architectures Software Developer Manual) RAPL provides hardware energy counters and power control MSRs (Model Specific Registers). RAPL MSRs are designed primarily as a method to implement power capping. However, they are useful for monitoring system power whether or not power capping is used. In addition, Turbostat now shows temperature from DTS (Digital Thermal Sensor) and PTM (Package Thermal Monitor) hardware, if present. As before, turbostat reads MSRs, and never writes MSRs. New columns are present in turbostat output: The Pkg_W column shows Watts for each package (socket) in the system. On multi-socket systems, the system summary on the 1st row shows the sum for all sockets together. The Cor_W column shows Watts due to processors cores. Note that Core_W is included in Pkg_W. The optional GFX_W column shows Watts due to the graphics "un-core". Note that GFX_W is included in Pkg_W. The optional RAM_W column on server processors shows Watts due to DRAM DIMMS. As DRAM DIMMs are outside the processor package, RAM_W is not included in Pkg_W. The optional PKG_% and RAM_% columns on server processors shows the % of time in the measurement interval that RAPL power limiting is in effect on the package and on DRAM. Note that the RAPL energy counters have some limitations. First, hardware updates the counters about once every milli-second. This is fine for typical turbostat measurement intervals > 1 sec. However, when turbostat is used to measure events that approach 1ms, the counters are less useful. Second, the 32-bit energy counters are subject to wrapping. For example, a counter incrementing 15 micro-Joule units on a 130 Watt TDP server processor could (in theory) roll over in about 9 minutes. Turbostat detects and handles up to 1 counter overflow per measurement interval. But when the measurement interval exceeds the guaranteed counter range, we can't detect if more than 1 overflow occured. So in this case turbostat indicates that the results are in question by replacing the fractional part of the Watts in the output with "**": Pkg_W Cor_W GFX_W 3** 0** 0** Third, the RAPL counters are energy (Joule) counters -- they sum up weighted events in the package to estimate energy consumed. They are not analong power (Watt) meters. In practice, they tend to under-count because they don't cover every possible use of energy in the package. The accuracy of the RAPL counters will vary between product generations, and between SKU's in the same product generation, and with temperature. turbostat's -v (verbose) option now displays more power and thermal configuration information -- as shown on the turbostat.8 manual page. For example, it now displays the Package and DRAM Thermal Design Power (TDP): cpu0: MSR_PKG_POWER_INFO: 0x2f064001980410 (130 W TDP, RAPL 51 - 200 W, 0.045898 sec.) cpu0: MSR_DRAM_POWER_INFO,: 0x28025800780118 (35 W TDP, RAPL 15 - 75 W, 0.039062 sec.) cpu8: MSR_PKG_POWER_INFO: 0x2f064001980410 (130 W TDP, RAPL 51 - 200 W, 0.045898 sec.) cpu8: MSR_DRAM_POWER_INFO,: 0x28025800780118 (35 W TDP, RAPL 15 - 75 W, 0.039062 sec.) Signed-off-by: Len Brown <len.brown@intel.com>
2012-10-06tools/power/turbostat: add option to count SMIs, re-name some optionsLen Brown1-5/+7
Counting SMIs is popular, so add a dedicated "-s" option to do it, and juggle some of the other option letters. -S is now system summary (was -s) -c is 32 bit counter (was -d) -C is 64-bit counter (was -D) -p is 1st thread in core (was -c) -P is 1st thread in package (was -p) bump the minor version number Signed-off-by: Len Brown <len.brown@intel.com>
2012-09-27tools/power turbostat: add [-d MSR#][-D MSR#] options to print counter deltasLen Brown1-12/+31
# turbostat -d 0x34 is useful for printing the number of SMI's within an interval on Nehalem and newer processors. where # turbostat -m 0x34 will simply print out the total SMI count since reset. Suggested-by: Andi Kleen Signed-off-by: Len Brown <len.brown@intel.com>
2012-09-26tools/power turbostat: add [-m MSR#] optionLen Brown1-1/+13
-m MSR# prints the specified MSR in 32-bit format -M MSR# prints the specified MSR in 64-bit format Signed-off-by: Len Brown <len.brown@intel.com>
2012-07-19tools/power: turbostat v2 - re-write for efficiencyLen Brown1-37/+40
Measuring large profoundly-idle configurations requires turbostat to be more lightweight. Otherwise, the operation of turbostat itself can interfere with the measurements. This re-write makes turbostat topology aware. Hardware is accessed in "topology order". Redundant hardware accesses are deleted. Redundant output is deleted. Also, output is buffered and local RDTSC use replaces remote MSR access for TSC. From a feature point of view, the output looks different since redundant figures are absent. Also, there are now -c and -p options -- to restrict output to the 1st thread in each core, and the 1st thread in each package, respectively. This is helpful to reduce output on big systems, where more detail than the "-s" system summary is desired. Finally, periodic mode output is now on stdout, not stderr. Turbostat v2 is also slightly more robust in handling run-time CPU online/offline events, as it now checks the actual map of on-line cpus rather than just the total number of on-line cpus. Signed-off-by: Len Brown <len.brown@intel.com>
2012-03-29tools turbostat: add summary optionLen Brown1-41/+58
turbostat -s cuts down on the amount of output, per user request. also treak some output whitespace and the man page. Signed-off-by: Len Brown <len.brown@intel.com>
2011-12-15tools/power turbostat: update fields in manpageArun Thomas1-4/+4
Field names were shortened: "pkg" is now "pk", "core" is now "cr" Signed-off-by: Arun Thomas <arun.thomas@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-11tools: create power/x86/turbostatLen Brown1-0/+172
turbostat is a Linux tool to observe proper operation of Intel(R) Turbo Boost Technology. turbostat displays the actual processor frequency on x86 processors that include APERF and MPERF MSRs. Note that turbostat is of limited utility on Linux kernels 2.6.29 and older, as acpi_cpufreq cleared APERF/MPERF up through that release. On Intel Core i3/i5/i7 (Nehalem) and newer processors, turbostat also displays residency in idle power saving states, which are necessary for diagnosing any cpuidle issues that may have an effect on turbo-mode. See the turbostat.8 man page for example usage. Signed-off-by: Len Brown <len.brown@intel.com>