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