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