1 .TH CPUPOWER\-MONITOR "1" "22/02/2011" "" "cpupower Manual"
3 cpupower\-monitor \- Report processor frequency and idle statistics
10 .RB [ "\-m <mon1>," [ "<mon2>,..." ] ]
14 .RB [ "\-m <mon1>," [ "<mon2>,..." ] ]
18 \fBcpupower-monitor \fP reports processor topology, frequency and idle power
19 state statistics. Either \fBcommand\fP is forked and
20 statistics are printed upon its completion, or statistics are printed periodically.
22 \fBcpupower-monitor \fP implements independent processor sleep state and
23 frequency counters. Some are retrieved from kernel statistics, some are
24 directly reading out hardware registers. Use \-l to get an overview which are
25 supported on your system.
31 List available monitors on your system. Additional details about each monitor
35 The name in quotation marks which can be passed to the \-m parameter.
37 The number of different counters the monitor supports in brackets.
39 The amount of time in seconds the counters might overflow, due to
40 implementation constraints.
42 The name and a description of each counter and its processor hierarchy level
43 coverage in square brackets:
50 [P] \-> Processor Package (Socket)
52 [M] \-> Machine/Platform wide counter
59 Only display specific monitors. Use the monitor string(s) provided by \-l option.
69 Measure idle and frequency characteristics of an arbitrary command/workload.
70 The executable \fBcommand\fP is forked and upon its exit, statistics gathered since it was
76 Increase verbosity if the binary was compiled with the DEBUG option set.
79 .SH MONITOR DESCRIPTIONS
81 Shows statistics of the cpuidle kernel subsystem. Values are retrieved from
82 /sys/devices/system/cpu/cpu*/cpuidle/state*/.
83 The kernel updates these values every time an idle state is entered or
84 left. Therefore there can be some inaccuracy when cores are in an idle
85 state for some time when the measure starts or ends. In worst case it can happen
86 that one core stayed in an idle state for the whole measure time and the idle
87 state usage time as exported by the kernel did not get updated. In this case
88 a state residency of 0 percent is shown while it was 100.
91 The name comes from the aperf/mperf (average and maximum) MSR registers used
92 which are available on recent X86 processors. It shows the average frequency
93 (including boost frequencies).
94 The fact that on all recent hardware the mperf timer stops ticking in any idle
95 state it is also used to show C0 (processor is active) and Cx (processor is in
96 any sleep state) times. These counters do not have the inaccuracy restrictions
97 the "Idle_Stats" counters may show.
98 May work poorly on Linux-2.6.20 through 2.6.29, as the \fBacpi-cpufreq \fP
99 kernel frequency driver periodically cleared aperf/mperf registers in those
102 .SS "Nehalem" "SandyBridge"
103 Intel Core and Package sleep state counters.
104 Threads (hyperthreaded cores) may not be able to enter deeper core states if
105 its sibling is utilized.
106 Deepest package sleep states may in reality show up as machine/platform wide
107 sleep states and can only be entered if all cores are idle. Look up Intel
108 manuals (some are provided in the References section) for further details.
110 .SS "Ontario" "Liano"
111 AMD laptop and desktop processor (family 12h and 14h) sleep state counters.
112 The registers are accessed via PCI and therefore can still be read out while
113 cores have been offlined.
115 There is one special counter: NBP1 (North Bridge P1).
116 This one always returns 0 or 1, depending on whether the North Bridge P1
117 power state got entered at least once during measure time.
118 Being able to enter NBP1 state also depends on graphics power management.
119 Therefore this counter can be used to verify whether the graphics' driver
120 power management is working as expected.
124 cpupower monitor -l" may show:
126 Monitor "Mperf" (3 states) \- Might overflow after 922000000 s
130 Monitor "Idle_Stats" (3 states) \- Might overflow after 4294967295 s
135 cpupower monitor \-m "Idle_Stats,Mperf" scp /tmp/test /nfs/tmp
137 Monitor the scp command, show both Mperf and Idle_Stats states counter
138 statistics, but in exchanged order.
143 Be careful that the typical command to fully utilize one CPU by doing:
145 cpupower monitor cat /dev/zero >/dev/null
147 Does 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
149 shell script. Hit CTRL\-c to terminate the command and get the measure output
153 "BIOS and Kernel Developer’s Guide (BKDG) for AMD Family 14h Processors"
154 http://support.amd.com/us/Processor_TechDocs/43170.pdf
156 "Intel® Turbo Boost Technology
157 in Intel® Core™ Microarchitecture (Nehalem) Based Processors"
158 http://download.intel.com/design/processor/applnots/320354.pdf
160 "Intel® 64 and IA-32 Architectures Software Developer's Manual
161 Volume 3B: System Programming Guide"
162 http://www.intel.com/products/processor/manuals
168 /sys/devices/system/cpu/cpu*/cpuidle/state*/.
172 powertop(8), msr(4), vmstat(8)
176 Written by Thomas Renninger <trenn@suse.de>
178 Nehalem, SandyBridge monitors and command passing
179 based on turbostat.8 from Len Brown <len.brown@intel.com>