xref: /freebsd/usr.sbin/pmccontrol/pmccontrol.8 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1c9e22139SJoseph Koshy.\" Copyright (c) 2003,2008 Joseph Koshy.  All rights reserved.
2ebccf1e3SJoseph Koshy.\"
3ebccf1e3SJoseph Koshy.\" Redistribution and use in source and binary forms, with or without
4ebccf1e3SJoseph Koshy.\" modification, are permitted provided that the following conditions
5ebccf1e3SJoseph Koshy.\" are met:
6ebccf1e3SJoseph Koshy.\" 1. Redistributions of source code must retain the above copyright
7ebccf1e3SJoseph Koshy.\"    notice, this list of conditions and the following disclaimer.
8ebccf1e3SJoseph Koshy.\" 2. Redistributions in binary form must reproduce the above copyright
9ebccf1e3SJoseph Koshy.\"    notice, this list of conditions and the following disclaimer in the
10ebccf1e3SJoseph Koshy.\"    documentation and/or other materials provided with the distribution.
11ebccf1e3SJoseph Koshy.\"
12ebccf1e3SJoseph Koshy.\" This software is provided by Joseph Koshy ``as is'' and
13ebccf1e3SJoseph Koshy.\" any express or implied warranties, including, but not limited to, the
14ebccf1e3SJoseph Koshy.\" implied warranties of merchantability and fitness for a particular purpose
15ebccf1e3SJoseph Koshy.\" are disclaimed.  in no event shall Joseph Koshy be liable
16ebccf1e3SJoseph Koshy.\" for any direct, indirect, incidental, special, exemplary, or consequential
17ebccf1e3SJoseph Koshy.\" damages (including, but not limited to, procurement of substitute goods
18ebccf1e3SJoseph Koshy.\" or services; loss of use, data, or profits; or business interruption)
19ebccf1e3SJoseph Koshy.\" however caused and on any theory of liability, whether in contract, strict
20ebccf1e3SJoseph Koshy.\" liability, or tort (including negligence or otherwise) arising in any way
21ebccf1e3SJoseph Koshy.\" out of the use of this software, even if advised of the possibility of
22ebccf1e3SJoseph Koshy.\" such damage.
23ebccf1e3SJoseph Koshy.\"
24c9e22139SJoseph Koshy.Dd November 9, 2008
25ebccf1e3SJoseph Koshy.Dt PMCCONTROL 8
26aa12cea2SUlrich Spörlein.Os
27ebccf1e3SJoseph Koshy.Sh NAME
28ebccf1e3SJoseph Koshy.Nm pmccontrol
29e7d86e80SRuslan Ermilov.Nd "control hardware performance monitoring counters"
30ebccf1e3SJoseph Koshy.Sh SYNOPSIS
31ebccf1e3SJoseph Koshy.Nm
32e7d86e80SRuslan Ermilov.Oo Fl c Ar cpu | Fl d Ar pmc | Fl e Ar pmc Oc ...
33ebccf1e3SJoseph Koshy.Nm
34e7d86e80SRuslan Ermilov.Fl l
35ebccf1e3SJoseph Koshy.Nm
36e7d86e80SRuslan Ermilov.Fl L
37e7d86e80SRuslan Ermilov.Nm
38e7d86e80SRuslan Ermilov.Fl s
39ebccf1e3SJoseph Koshy.Sh DESCRIPTION
40ebccf1e3SJoseph KoshyThe
41ebccf1e3SJoseph Koshy.Nm
42ebccf1e3SJoseph Koshyutility controls the operation of the system's hardware performance
43ebccf1e3SJoseph Koshymonitoring counters.
44ebccf1e3SJoseph Koshy.Sh OPTIONS
45ebccf1e3SJoseph KoshyThe
46ebccf1e3SJoseph Koshy.Nm
47ebccf1e3SJoseph Koshyutility processes options in command line order, so later options modify
48ebccf1e3SJoseph Koshythe effect of earlier ones.
49ebccf1e3SJoseph KoshyThe following options are available:
50ebccf1e3SJoseph Koshy.Bl -tag -width indent
51ebccf1e3SJoseph Koshy.It Fl c Ar cpu
52ebccf1e3SJoseph KoshySubsequent enable and disable options affect the CPU
53c9e22139SJoseph Koshydenoted by argument
54ebccf1e3SJoseph Koshy.Ar cpu .
55ebccf1e3SJoseph KoshyThe argument
56ebccf1e3SJoseph Koshy.Ar cpu
57c9e22139SJoseph Koshyis a number denoting a CPU in the system, or
58e7d86e80SRuslan Ermilov.Dq Li * ,
59c9e22139SJoseph Koshydenoting all unhalted CPUs in the system.
60ebccf1e3SJoseph Koshy.It Fl d Ar pmc
61ebccf1e3SJoseph KoshyDisable PMC number
62ebccf1e3SJoseph Koshy.Ar pmc
63ebccf1e3SJoseph Koshyon the CPU specified by
64ebccf1e3SJoseph Koshy.Fl c ,
65ebccf1e3SJoseph Koshypreventing it from being used till subsequently re-enabled.
66ebccf1e3SJoseph KoshyThe argument
67ebccf1e3SJoseph Koshy.Ar pmc
68c9e22139SJoseph Koshyis a number denoting a specific PMC, or
69e7d86e80SRuslan Ermilov.Dq Li *
70ebccf1e3SJoseph Koshydenoting all the PMCs on the specified CPU.
71ebccf1e3SJoseph Koshy.Pp
72ebccf1e3SJoseph KoshyOnly idle PMCs may be disabled.
73ebccf1e3SJoseph Koshy.\" XXX this probably needs to be fixed.
74ebccf1e3SJoseph Koshy.It Fl e Ar pmc
75ebccf1e3SJoseph KoshyEnable PMC number
76ebccf1e3SJoseph Koshy.Ar pmc ,
77ebccf1e3SJoseph Koshyon the CPU specified by
78ebccf1e3SJoseph Koshy.Fl c ,
79ebccf1e3SJoseph Koshyallowing it to be used in the future.
80ebccf1e3SJoseph KoshyThe argument
81ebccf1e3SJoseph Koshy.Ar pmc
82c9e22139SJoseph Koshyis a number denoting a specific PMC, or
83e7d86e80SRuslan Ermilov.Dq Li *
84ebccf1e3SJoseph Koshydenoting all the PMCs on the specified CPU.
85ebccf1e3SJoseph KoshyIf PMC
86ebccf1e3SJoseph Koshy.Ar pmc
87ebccf1e3SJoseph Koshyis already enabled, this option has no effect.
88ebccf1e3SJoseph Koshy.It Fl l
89ebccf1e3SJoseph KoshyList available hardware performance counters and their current
90ebccf1e3SJoseph Koshydisposition.
91ebccf1e3SJoseph Koshy.It Fl L
92ebccf1e3SJoseph KoshyList available hardware performance counter classes and their
93ebccf1e3SJoseph Koshysupported event names.
94ebccf1e3SJoseph Koshy.It Fl s
95ebccf1e3SJoseph KoshyPrint driver statistics maintained by
96ebccf1e3SJoseph Koshy.Xr hwpmc 4 .
97ebccf1e3SJoseph Koshy.El
98ebccf1e3SJoseph Koshy.Sh EXAMPLES
99ebccf1e3SJoseph KoshyTo disable all PMCs on all CPUs, use the command:
100e7d86e80SRuslan Ermilov.Dl "pmccontrol -d*"
101ebccf1e3SJoseph Koshy.Pp
102ebccf1e3SJoseph KoshyTo enable all PMCs on all CPUs, use:
103e7d86e80SRuslan Ermilov.Dl "pmccontrol -e*"
104ebccf1e3SJoseph Koshy.Pp
105ebccf1e3SJoseph KoshyTo disable PMCs 0 and 1 on CPU 2, use:
106e7d86e80SRuslan Ermilov.Dl "pmccontrol -c2 -d0 -d1"
107ebccf1e3SJoseph Koshy.Pp
108ebccf1e3SJoseph KoshyTo disable PMC 0 of CPU 0 only, and enable all other PMCS on all other
109ebccf1e3SJoseph KoshyCPUs, use:
110e7d86e80SRuslan Ermilov.Dl "pmccontrol -c* -e* -c0 -d0"
111ebccf1e3SJoseph Koshy.Sh DIAGNOSTICS
112e7d86e80SRuslan Ermilov.Ex -std
113ebccf1e3SJoseph Koshy.Sh SEE ALSO
114ebccf1e3SJoseph Koshy.Xr pmc 3 ,
115e7d86e80SRuslan Ermilov.Xr pmclog 3 ,
116ebccf1e3SJoseph Koshy.Xr hwpmc 4 ,
117ebccf1e3SJoseph Koshy.Xr pmcstat 8 ,
118ebccf1e3SJoseph Koshy.Xr sysctl 8
119e7d86e80SRuslan Ermilov.Sh HISTORY
120e7d86e80SRuslan ErmilovThe
121e7d86e80SRuslan Ermilov.Nm
122e7d86e80SRuslan Ermilovutility first appeared in
123e7d86e80SRuslan Ermilov.Fx 6.0 .
124e7d86e80SRuslan Ermilov.Sh AUTHORS
125*01c2b8acSBaptiste Daroussin.An Joseph Koshy Aq Mt jkoshy@FreeBSD.org
126