1. 01 3月, 2017 6 次提交
    • L
      tools/power turbostat: support "--hide C1" etc. · dd778a5e
      Len Brown 提交于
      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: NLen Brown <len.brown@intel.com>
      dd778a5e
    • L
      tools/power turbostat: move --Package and --processor into the --cpu option · 4e4e1e7c
      Len Brown 提交于
      --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: NLen Brown <len.brown@intel.com>
      4e4e1e7c
    • L
      tools/power turbostat: turbostat.8 update · da67e2b9
      Len Brown 提交于
      update examples to show recently updated features.
      In particular
      --add
      --show
      --hide
      --cpu
      --list
      Signed-off-by: NLen Brown <len.brown@intel.com>
      da67e2b9
    • L
      tools/power turbostat: add --cpu parameter · 1ef7d21a
      Len Brown 提交于
      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: NLen Brown <len.brown@intel.com>
      1ef7d21a
    • L
      tools/power turbostat: print sysfs C-state stats · 41618e63
      Len Brown 提交于
      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: NLen Brown <len.brown@intel.com>
      41618e63
    • L
      tools/power turbostat: print system config, unless --quiet · 96e47158
      Len Brown 提交于
      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: NLen Brown <len.brown@intel.com>
      96e47158
  2. 26 2月, 2017 1 次提交
    • L
      tools/power turbostat: Add --show and --hide parameters · 812db3f7
      Len Brown 提交于
      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: NLen Brown <len.brown@intel.com>
      812db3f7
  3. 25 12月, 2016 2 次提交
    • L
      tools/power turbostat: remove obsolete -M, -m, -C, -c options · 6886fee4
      Len Brown 提交于
      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: NLen Brown <len.brown@intel.com>
      6886fee4
    • L
      tools/power turbostat: Make extensible via the --add parameter · 388e9c81
      Len Brown 提交于
      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: NLen Brown <len.brown@intel.com>
      388e9c81
  4. 07 7月, 2016 1 次提交
  5. 13 3月, 2016 3 次提交
  6. 03 6月, 2015 1 次提交
  7. 14 4月, 2015 1 次提交
  8. 10 2月, 2015 2 次提交
    • L
      tools/power turbostat: update parameters, documentation · d8af6f5f
      Len Brown 提交于
      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: NLen Brown <len.brown@intel.com>
      d8af6f5f
    • L
      tools/power turbostat: relax dependency on APERF_MSR · a729617c
      Len Brown 提交于
      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: NLen Brown <len.brown@intel.com>
      a729617c
  9. 06 3月, 2014 1 次提交
    • L
      tools/power turbostat: simplify output, add Avg_MHz · fc04cc67
      Len Brown 提交于
      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: NLen Brown <len.brown@intel.com>
      fc04cc67
  10. 14 2月, 2013 1 次提交
    • L
      tools/power turbostat: display SMI count by default · 1ed51011
      Len Brown 提交于
      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: NLen Brown <len.brown@intel.com>
      1ed51011
  11. 30 11月, 2012 1 次提交
    • L
      tools/power turbostat: v3.0: monitor Watts and Temperature · 889facbe
      Len Brown 提交于
      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: NLen Brown <len.brown@intel.com>
      889facbe
  12. 07 10月, 2012 1 次提交
  13. 28 9月, 2012 1 次提交
  14. 27 9月, 2012 1 次提交
  15. 20 7月, 2012 1 次提交
    • L
      tools/power: turbostat v2 - re-write for efficiency · c98d5d94
      Len Brown 提交于
      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: NLen Brown <len.brown@intel.com>
      c98d5d94
  16. 30 3月, 2012 1 次提交
  17. 15 12月, 2011 1 次提交
  18. 12 1月, 2011 1 次提交
    • L
      tools: create power/x86/turbostat · 103a8fea
      Len Brown 提交于
      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: NLen Brown <len.brown@intel.com>
      103a8fea