Skip to content

Commit 944264a

Browse files
Patryk Wlazlynlenb
authored andcommitted
tools/power turbostat: Document PMT in turbostat.8
Add a general description of the user interface for adding PMT counters with the new --add pmt,... option. Provide a complete example for requesting two counters. Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
1 parent 640540b commit 944264a

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

tools/power/x86/turbostat/turbostat.8

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,39 @@ name as necessary to disambiguate it from others is necessary. Note that option
5555
as the column header.
5656
.fi
5757
.PP
58+
\fB--add pmt,[attr_name=attr_value, ...]\fP add column with a PMT (Intel Platform Monitoring Technology) counter in a similar way to --add option above, but require PMT metadata to be supplied to correctly read and display the counter. The metadata can be found in the Intel PMT XML files, hosted at https://github.com/intel/Intel-PMT. For a complete example see "ADD PMT COUNTER EXAMPLE".
59+
.nf
60+
name="name_string"
61+
For column header.
62+
63+
type={\fBraw\fP}
64+
'raw' shows the counter contents in hex.
65+
default: raw
66+
67+
format={\fBraw\fP | \fBdelta\fP}
68+
'raw' shows the counter contents in hex.
69+
'delta' shows the difference in values during the measurement interval.
70+
default: raw
71+
72+
domain={\fBcpu%u\fP | \fBcore%u\fP | \fBpackage%u\fP}
73+
'cpu' per cpu/thread counter.
74+
'core' per core counter.
75+
'package' per package counter.
76+
'%u' denotes id of the domain that the counter is associated with. For example core4 would mean that the counter is associated with core number 4.
77+
78+
offset=\fB%u\fP
79+
'%u' offset within the PMT MMIO region.
80+
81+
lsb=\fB%u\fP
82+
'%u' least significant bit within the 64 bit value read from 'offset'. Together with 'msb', used to form a read mask.
83+
84+
msb=\fB%u\fP
85+
'%u' most significant bit within the 64 bit value read from 'offset'. Together with 'lsb', used to form a read mask.
86+
87+
guid=\fB%x\fP
88+
'%x' hex identifier of the PMT MMIO region.
89+
.fi
90+
.PP
5891
\fB--cpu cpu-set\fP limit output to system summary plus the specified cpu-set. If cpu-set is the string "core", then the system summary plus the first CPU in each core are printed -- eg. subsequent HT siblings are not printed. Or if cpu-set is the string "package", then the system summary plus the first CPU in each package is printed. Otherwise, the system summary plus the specified set of CPUs are printed. The cpu-set is ordered from low to high, comma delimited with ".." and "-" permitted to denote a range. eg. 1,2,8,14..17,21-44
5992
.PP
6093
\fB--hide column\fP do not show the specified built-in columns. May be invoked multiple times, or with a comma-separated list of column names.
@@ -354,6 +387,38 @@ CPU pCPU%c1 CPU%c1
354387

355388
.fi
356389

390+
.SH ADD PMT COUNTER EXAMPLE
391+
Here we limit turbostat to showing just the CPU number 0.
392+
We add two counters, showing crystal clock count and the DC6 residency.
393+
All the parameters passed are based on the metadata found in the PMT XML files.
394+
395+
For the crystal clock count, we
396+
label it with the column header, "XTAL",
397+
we set the type to 'raw', to read the number of clock ticks in hex,
398+
we set the format to 'delta', to display the difference in ticks during the measurement interval,
399+
we set the domain to 'package0', to collect it and associate it with the whole package number 0,
400+
we set the offset to '0', which is a offset of the counter within the PMT MMIO region,
401+
we set the lsb and msb to cover all 64 bits of the read 64 bit value,
402+
and finally we set the guid to '0x1a067102', that identifies the PMT MMIO region to which the 'offset' is applied to read the counter value.
403+
404+
For the DC6 residency counter, we
405+
label it with the column header, "Die%c6",
406+
we set the type to 'txtal_time', to obtain the percent residency value
407+
we set the format to 'delta', to display the difference in ticks during the measurement interval,
408+
we set the domain to 'package0', to collect it and associate it with the whole package number 0,
409+
we set the offset to '0', which is a offset of the counter within the PMT MMIO region,
410+
we set the lsb and msb to cover all 64 bits of the read 64 bit value,
411+
and finally we set the guid to '0x1a067102', that identifies the PMT MMIO region to which the 'offset' is applied to read the counter value.
412+
413+
.nf
414+
sudo ./turbostat --quiet --cpu 0 --show CPU --add pmt,name=XTAL,type=raw,format=delta,domain=package0,offset=0,lsb=0,msb=63,guid=0x1a067102 --add pmt,name=Die%c6,type=txtal_time,format=delta,domain=package0,offset=120,lsb=0,msb=63,guid=0x1a067102
415+
0.104352 sec
416+
CPU XTAL Die%c6
417+
- 0x0000006d4d957ca7 0.00
418+
0 0x0000006d4d957ca7 0.00
419+
0.102448 sec
420+
.fi
421+
357422
.SH INPUT
358423

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

0 commit comments

Comments
 (0)