xref: /freebsd/usr.sbin/pmccontrol/pmccontrol.8 (revision aa12cea2ccc6e686d6d31cf67d6bc69cbc1ba744)
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.\"
24ebccf1e3SJoseph Koshy.\" $FreeBSD$
25ebccf1e3SJoseph Koshy.\"
26c9e22139SJoseph Koshy.Dd November 9, 2008
27ebccf1e3SJoseph Koshy.Dt PMCCONTROL 8
28*aa12cea2SUlrich Spörlein.Os
29ebccf1e3SJoseph Koshy.Sh NAME
30ebccf1e3SJoseph Koshy.Nm pmccontrol
31e7d86e80SRuslan Ermilov.Nd "control hardware performance monitoring counters"
32ebccf1e3SJoseph Koshy.Sh SYNOPSIS
33ebccf1e3SJoseph Koshy.Nm
34e7d86e80SRuslan Ermilov.Oo Fl c Ar cpu | Fl d Ar pmc | Fl e Ar pmc Oc ...
35ebccf1e3SJoseph Koshy.Nm
36e7d86e80SRuslan Ermilov.Fl l
37ebccf1e3SJoseph Koshy.Nm
38e7d86e80SRuslan Ermilov.Fl L
39e7d86e80SRuslan Ermilov.Nm
40e7d86e80SRuslan Ermilov.Fl s
41ebccf1e3SJoseph Koshy.Sh DESCRIPTION
42ebccf1e3SJoseph KoshyThe
43ebccf1e3SJoseph Koshy.Nm
44ebccf1e3SJoseph Koshyutility controls the operation of the system's hardware performance
45ebccf1e3SJoseph Koshymonitoring counters.
46ebccf1e3SJoseph Koshy.Sh OPTIONS
47ebccf1e3SJoseph KoshyThe
48ebccf1e3SJoseph Koshy.Nm
49ebccf1e3SJoseph Koshyutility processes options in command line order, so later options modify
50ebccf1e3SJoseph Koshythe effect of earlier ones.
51ebccf1e3SJoseph KoshyThe following options are available:
52ebccf1e3SJoseph Koshy.Bl -tag -width indent
53ebccf1e3SJoseph Koshy.It Fl c Ar cpu
54ebccf1e3SJoseph KoshySubsequent enable and disable options affect the CPU
55c9e22139SJoseph Koshydenoted by argument
56ebccf1e3SJoseph Koshy.Ar cpu .
57ebccf1e3SJoseph KoshyThe argument
58ebccf1e3SJoseph Koshy.Ar cpu
59c9e22139SJoseph Koshyis a number denoting a CPU in the system, or
60e7d86e80SRuslan Ermilov.Dq Li * ,
61c9e22139SJoseph Koshydenoting all unhalted CPUs in the system.
62ebccf1e3SJoseph Koshy.It Fl d Ar pmc
63ebccf1e3SJoseph KoshyDisable PMC number
64ebccf1e3SJoseph Koshy.Ar pmc
65ebccf1e3SJoseph Koshyon the CPU specified by
66ebccf1e3SJoseph Koshy.Fl c ,
67ebccf1e3SJoseph Koshypreventing it from being used till subsequently re-enabled.
68ebccf1e3SJoseph KoshyThe argument
69ebccf1e3SJoseph Koshy.Ar pmc
70c9e22139SJoseph Koshyis a number denoting a specific PMC, or
71e7d86e80SRuslan Ermilov.Dq Li *
72ebccf1e3SJoseph Koshydenoting all the PMCs on the specified CPU.
73ebccf1e3SJoseph Koshy.Pp
74ebccf1e3SJoseph KoshyOnly idle PMCs may be disabled.
75ebccf1e3SJoseph Koshy.\" XXX this probably needs to be fixed.
76ebccf1e3SJoseph Koshy.It Fl e Ar pmc
77ebccf1e3SJoseph KoshyEnable PMC number
78ebccf1e3SJoseph Koshy.Ar pmc ,
79ebccf1e3SJoseph Koshyon the CPU specified by
80ebccf1e3SJoseph Koshy.Fl c ,
81ebccf1e3SJoseph Koshyallowing it to be used in the future.
82ebccf1e3SJoseph KoshyThe argument
83ebccf1e3SJoseph Koshy.Ar pmc
84c9e22139SJoseph Koshyis a number denoting a specific PMC, or
85e7d86e80SRuslan Ermilov.Dq Li *
86ebccf1e3SJoseph Koshydenoting all the PMCs on the specified CPU.
87ebccf1e3SJoseph KoshyIf PMC
88ebccf1e3SJoseph Koshy.Ar pmc
89ebccf1e3SJoseph Koshyis already enabled, this option has no effect.
90ebccf1e3SJoseph Koshy.It Fl l
91ebccf1e3SJoseph KoshyList available hardware performance counters and their current
92ebccf1e3SJoseph Koshydisposition.
93ebccf1e3SJoseph Koshy.It Fl L
94ebccf1e3SJoseph KoshyList available hardware performance counter classes and their
95ebccf1e3SJoseph Koshysupported event names.
96ebccf1e3SJoseph Koshy.It Fl s
97ebccf1e3SJoseph KoshyPrint driver statistics maintained by
98ebccf1e3SJoseph Koshy.Xr hwpmc 4 .
99ebccf1e3SJoseph Koshy.El
100ebccf1e3SJoseph Koshy.Sh EXAMPLES
101ebccf1e3SJoseph KoshyTo disable all PMCs on all CPUs, use the command:
102e7d86e80SRuslan Ermilov.Dl "pmccontrol -d*"
103ebccf1e3SJoseph Koshy.Pp
104ebccf1e3SJoseph KoshyTo enable all PMCs on all CPUs, use:
105e7d86e80SRuslan Ermilov.Dl "pmccontrol -e*"
106ebccf1e3SJoseph Koshy.Pp
107ebccf1e3SJoseph KoshyTo disable PMCs 0 and 1 on CPU 2, use:
108e7d86e80SRuslan Ermilov.Dl "pmccontrol -c2 -d0 -d1"
109ebccf1e3SJoseph Koshy.Pp
110ebccf1e3SJoseph KoshyTo disable PMC 0 of CPU 0 only, and enable all other PMCS on all other
111ebccf1e3SJoseph KoshyCPUs, use:
112e7d86e80SRuslan Ermilov.Dl "pmccontrol -c* -e* -c0 -d0"
113ebccf1e3SJoseph Koshy.Sh DIAGNOSTICS
114e7d86e80SRuslan Ermilov.Ex -std
115ebccf1e3SJoseph Koshy.Sh SEE ALSO
116ebccf1e3SJoseph Koshy.Xr pmc 3 ,
117e7d86e80SRuslan Ermilov.Xr pmclog 3 ,
118ebccf1e3SJoseph Koshy.Xr hwpmc 4 ,
119ebccf1e3SJoseph Koshy.Xr pmcstat 8 ,
120ebccf1e3SJoseph Koshy.Xr sysctl 8
121e7d86e80SRuslan Ermilov.Sh HISTORY
122e7d86e80SRuslan ErmilovThe
123e7d86e80SRuslan Ermilov.Nm
124e7d86e80SRuslan Ermilovutility first appeared in
125e7d86e80SRuslan Ermilov.Fx 6.0 .
126e7d86e80SRuslan Ermilov.Sh AUTHORS
127e7d86e80SRuslan Ermilov.An Joseph Koshy Aq jkoshy@FreeBSD.org
128