Skip to content

Commit 9f50066

Browse files
Patryk Wlazlynlenb
authored andcommitted
tools/power turbostat: Add perf added counter example to turbostat.8
We had few lines about the feature, but without any complete examples. Signed-off-by: Patryk Wlazlyn <[email protected]> Signed-off-by: Len Brown <[email protected]>
1 parent 25826c2 commit 9f50066

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tools/power/x86/turbostat/turbostat.8

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,24 @@ CPU PRF_CTRL
336336

337337
.fi
338338

339+
.SH ADD PERF COUNTER EXAMPLE
340+
Here we limit turbostat to showing just the CPU number for cpu0 - cpu3.
341+
We add a counter showing time spent in C1 core cstate,
342+
labeling it with the column header, "pCPU%c1", and display it only once,
343+
after the conclusion of 0.1 second sleep.
344+
We also show CPU%c1 built-in counter that should show similar values.
345+
.nf
346+
sudo ./turbostat --quiet --cpu 0-3 --show CPU,CPU%c1 --add perf/cstate_core/c1-residency,cpu,delta,percent,pCPU%c1 sleep .1
347+
0.102448 sec
348+
CPU pCPU%c1 CPU%c1
349+
- 34.89 34.89
350+
0 45.99 45.99
351+
1 45.94 45.94
352+
2 23.83 23.83
353+
3 23.84 23.84
354+
355+
.fi
356+
339357
.SH INPUT
340358

341359
For interval-mode, turbostat will immediately end the current interval

0 commit comments

Comments
 (0)