1CPUPOWER-MONITOR(1)             cpupower Manual            CPUPOWER-MONITOR(1)
2
3
4

NAME

6       cpupower-monitor - Report processor frequency and idle statistics
7

SYNOPSIS

9       cpupower monitor -l
10
11       cpupower monitor [-m <mon1>,[<mon2>,...]]  [-i seconds]
12       cpupower monitor [-m <mon1>,[<mon2>,...]]  command
13

DESCRIPTION

15       cpupower-monitor   reports processor topology, frequency and idle power
16       state statistics. Either command is forked and statistics  are  printed
17       upon its completion, or statistics are printed periodically.
18
19       cpupower-monitor  implements independent processor sleep state and fre‐
20       quency counters. Some are retrieved from kernel  statistics,  some  are
21       directly  reading  out  hardware  registers.  Use -l to get an overview
22       which are supported on your system.
23
24

Options

26       -l
27           List available monitors on your system.  Additional  details  about
28           each monitor are shown:
29
30             ·      The  name in quotation marks which can be passed to the -m
31                    parameter.
32
33             ·      The number of different counters the monitor  supports  in
34                    brackets.
35
36             ·      The amount of time in seconds the counters might overflow,
37                    due to implementation constraints.
38
39             ·      The name and a description of each counter and its proces‐
40                    sor hierarchy level coverage in square brackets:
41
42                 ·      [T] -> Thread
43
44                 ·      [C] -> Core
45
46                 ·      [P] -> Processor Package (Socket)
47
48                 ·      [M] -> Machine/Platform wide counter
49
50       -m <mon1>,<mon2>,...
51           Only  display specific monitors. Use the monitor string(s) provided
52           by -l option.
53
54       -i seconds
55           Measure intervall.
56
57       command
58           Measure idle and frequency characteristics  of  an  arbitrary  com‐
59           mand/workload.  The executable command is forked and upon its exit,
60           statistics gathered since it was forked are displayed.
61
62       -v
63           Increase verbosity if the binary was compiled with the DEBUG option
64           set.
65
66

MONITOR DESCRIPTIONS

68   Idle_Stats
69       Shows  statistics of the cpuidle kernel subsystem. Values are retrieved
70       from /sys/devices/system/cpu/cpu*/cpuidle/state*/.  The kernel  updates
71       these  values  every  time  an idle state is entered or left. Therefore
72       there can be some inaccuracy when cores are in an idle state  for  some
73       time  when the measure starts or ends. In worst case it can happen that
74       one core stayed in an idle state for the whole  measure  time  and  the
75       idle state usage time as exported by the kernel did not get updated. In
76       this case a state residency of 0 percent is shown while it was 100.
77
78
79   Mperf
80       The name comes from the aperf/mperf (average and maximum) MSR registers
81       used which are available on recent X86 processors. It shows the average
82       frequency (including boost frequencies).  The fact that on  all  recent
83       hardware  the  mperf  timer  stops ticking in any idle state it is also
84       used to show C0 (processor is active) and Cx (processor is in any sleep
85       state)  times.  These  counters do not have the inaccuracy restrictions
86       the "Idle_Stats" counters may show.  May work  poorly  on  Linux-2.6.20
87       through  2.6.29,  as  the acpi-cpufreq kernel frequency driver periodi‐
88       cally cleared aperf/mperf registers in those kernels.
89
90
91   Nehalem SandyBridge HaswellExtended
92       Intel Core and Package sleep state  counters.   Threads  (hyperthreaded
93       cores)  may  not  be able to enter deeper core states if its sibling is
94       utilized.  Deepest package sleep states  may  in  reality  show  up  as
95       machine/platform wide sleep states and can only be entered if all cores
96       are idle. Look up Intel manuals (some are provided  in  the  References
97       section)  for  further  details.   The monitors are named after the CPU
98       family where the sleep state capabilities got introduced  and  may  not
99       match  exactly  the CPU name of the platform.  For example an IvyBridge
100       processor has sleep state capabilities which got introduced in  Nehalem
101       and SandyBridge processor families.  Thus on an IvyBridge processor one
102       will get Nehalem and SandyBridge sleep state monitors.  HaswellExtended
103       extra package sleep state capabilities are available only in a specific
104       Haswell (family 0x45) and probably also other future processors.
105
106
107   Fam_12h Fam_14h
108       AMD laptop and desktop processor (family 12h and 14h) sleep state coun‐
109       ters.   The  registers  are accessed via PCI and therefore can still be
110       read out while cores have been offlined.
111
112       There is one special counter: NBP1 (North Bridge P1).  This one  always
113       returns  0  or  1, depending on whether the North Bridge P1 power state
114       got entered at least once during measure time.   Being  able  to  enter
115       NBP1  state  also depends on graphics power management.  Therefore this
116       counter can be used to verify whether the graphics' driver  power  man‐
117       agement is working as expected.
118
119

EXAMPLES

121       cpupower monitor -l" may show:
122           Monitor "Mperf" (3 states) - Might overflow after 922000000 s
123
124              ...
125
126           Monitor "Idle_Stats" (3 states) - Might overflow after 4294967295 s
127
128              ...
129
130       cpupower monitor -m "Idle_Stats,Mperf" scp /tmp/test /nfs/tmp
131
132       Monitor  the scp command, show both Mperf and Idle_Stats states counter
133       statistics, but in exchanged order.
134
135
136
137       Be careful that the typical command to fully utilize one CPU by doing:
138
139       cpupower monitor cat /dev/zero >/dev/null
140
141       Does not work as expected, because the measured output is redirected to
142       /dev/null. This could get workarounded by putting the line into an own,
143       tiny shell script. Hit CTRL-c to terminate the command and get the mea‐
144       sure output displayed.
145
146

REFERENCES

148       "BIOS  and  Kernel  Developer’s Guide (BKDG) for AMD Family 14h Proces‐
149       sors" http://support.amd.com/us/Processor_TechDocs/43170.pdf
150
151       "Intel®  Turbo  Boost  Technology  in  Intel®  Core™  Microarchitecture
152       (Nehalem)  Based  Processors"  http://download.intel.com/design/proces
153       sor/applnots/320354.pdf
154
155       "Intel® 64 and IA-32 Architectures Software Developer's  Manual  Volume
156       3B:  System  Programming  Guide"  http://www.intel.com/products/proces
157       sor/manuals
158
159

FILES

161       /dev/cpu/*/msr
162       /sys/devices/system/cpu/cpu*/cpuidle/state*/.
163
164

SEE ALSO

166       powertop(8), msr(4), vmstat(8)
167

AUTHORS

169       Written by Thomas Renninger <trenn@suse.de>
170
171       Nehalem, SandyBridge monitors and command passing
172       based on turbostat.8 from Len Brown <len.brown@intel.com>
173
174
175
176                                  22/02/2011               CPUPOWER-MONITOR(1)
Impressum