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