Skip to content

Commit 388e9c8

Browse files
committed
tools/power turbostat: Make extensible via the --add parameter
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 <[email protected]>
1 parent 7268d40 commit 388e9c8

File tree

2 files changed

+409
-9
lines changed

2 files changed

+409
-9
lines changed

tools/power/x86/turbostat/turbostat.8

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,28 @@ Some information is not available on older processors.
2525
.SS Options
2626
Options can be specified with a single or double '-', and only as much of the option
2727
name as necessary to disambiguate it from others is necessary. Note that options are case-sensitive.
28+
.PP
29+
\fB--add attributes\fP add column with counter having specified 'attributes'. The 'location' attribute is required, all others are optional.
30+
.nf
31+
location: {\fBmsrDDD\fP | \fBmsr0xXXX\fP}
32+
msrDDD is a decimal offset, eg. msr16
33+
msr0xXXX is a hex offset, eg. msr0x10
34+
35+
scope: {\fBcpu\fP | \fBcore\fP | \fBpackage\fP}
36+
sample and print the counter for every cpu, core, or package.
37+
default: cpu
38+
39+
size: {\fBu32\fP | \fBu64\fP }
40+
MSRs are read as 64-bits, u32 truncates the displayed value to 32-bits.
41+
default: u64
42+
43+
format: {\fBraw\fP | \fBdelta\fP | \fBpercent\fP}
44+
'raw' shows the MSR contents in hex.
45+
'delta' shows the difference in values during the measurement interval.
46+
'percent' shows the delta as a percentage of the cycles elapsed.
47+
default: delta
48+
.fi
49+
.PP
2850
\fB--Counter MSR#\fP shows the delta of the specified 64-bit MSR counter.
2951
.PP
3052
\fB--counter MSR#\fP shows the delta of the specified 32-bit MSR counter.

0 commit comments

Comments
 (0)