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