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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
|
'\" te
.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH PLOCKSTAT 1M "May 23, 2020"
.SH NAME
plockstat \- report user-level lock statistics
.SH SYNOPSIS
.nf
\fBplockstat\fR [\fB-vACHV\fR] [\fB-n\fR \fIcount\fR] [\fB-s\fR \fIdepth\fR] [\fB-e\fR \fIsecs\fR]
[\fB-x\fR \fIarg\fR [=val]] \fIcommand\fR [\fIarg\fR]...
.fi
.LP
.nf
\fBplockstat\fR [\fB-vACHV\fR] [\fB-n\fR \fIcount\fR] [\fB-s\fR \fIdepth\fR] [\fB-e\fR \fIsecs\fR]
[\fB-x\fR \fIarg\fR [=val]] \fB-p\fR \fIpid\fR
.fi
.SH DESCRIPTION
The \fBplockstat\fR utility gathers and displays user-level locking statistics.
By default, \fBplockstat\fR monitors all lock contention events, gathers
frequency and timing data about those events, and displays the data in
decreasing frequency order, so that the most common events appear first.
.sp
.LP
\fBplockstat\fR gathers data until the specified command completes or the
process specified with the \fB-p\fR option completes.
.sp
.LP
\fBplockstat\fR relies on DTrace to instrument a running process or a command
it invokes to trace events of interest. This imposes a small but measurable
performance overhead on the processes being observed. Users must have the
\fBdtrace_proc\fR privilege and have permission to observe a particular process
with \fBplockstat\fR. Refer to the \fIDynamic Tracing Guide\fR for more
information about DTrace security features.
.SH OPTIONS
The following options are supported:
.sp
.ne 2
.na
\fB\fB-A\fR\fR
.ad
.RS 16n
Watch all lock events. This option is equivalent to \fB-CH\fR.
.RE
.sp
.ne 2
.na
\fB\fB-C\fR\fR
.ad
.RS 16n
Watch contention events.
.RE
.sp
.ne 2
.na
\fB\fB-H\fR\fR
.ad
.RS 16n
Watch hold events.
.RE
.sp
.ne 2
.na
\fB\fB-e\fR \fIsecs\fR\fR
.ad
.RS 16n
Exit after the number of seconds specified have elapsed.
.RE
.sp
.ne 2
.na
\fB\fB-n\fR \fIcount\fR\fR
.ad
.RS 16n
Display only the specified number of entries for each output category.
.RE
.sp
.ne 2
.na
\fB\fB-s\fR \fIdepth\fR\fR
.ad
.RS 16n
Record a stack trace rather than just the calling function.
.RE
.sp
.ne 2
.na
\fB\fB-p\fR \fIpid\fR\fR
.ad
.RS 16n
Specify a process ID from which \fBplockstat\fR is to gather data.
.RE
.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.RS 16n
Print out a message to indicate that tracing has started.
.RE
.sp
.ne 2
.na
\fB\fB-x\fR \fIarg\fR[=\fIval\fR]\fR
.ad
.RS 16n
Enable or modify a DTrace runtime option or D compiler option. The list of
options is found in the \fIDynamic Tracing Guide\fR. Boolean options
are enabled by specifying their name. Options with values are set by separating
the option name and value with an equals sign (\fB=\fR).
.RE
.sp
.ne 2
.na
\fB\fB-V\fR\fR
.ad
.RS 16n
Print the DTrace commands used to gather the data. The output can then be used
directly with the \fBdtrace\fR(1M) command.
.RE
.SH OPERANDS
The following operands are supported:
.sp
.ne 2
.na
\fB\fIarg\fR\fR
.ad
.RS 11n
A string to be passed as an argument to \fIcommand\fR.
.RE
.sp
.ne 2
.na
\fB\fIcommand\fR\fR
.ad
.RS 11n
The name of a utility to be invoked.
.RE
.sp
.ne 2
.na
\fB\fIcount\fR\fR
.ad
.RS 11n
A positive integer value.
.RE
.sp
.ne 2
.na
\fB\fIpid\fR\fR
.ad
.RS 11n
A process identifier for a process to be monitored.
.RE
.sp
.ne 2
.na
\fB\fIsecs\fR\fR
.ad
.RS 11n
Duration specified as a positive integer number of seconds.
.RE
.SH EXIT STATUS
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 6n
Successful completion.
.RE
.sp
.ne 2
.na
\fB>\fB0\fR\fR
.ad
.RS 6n
An error occurred.
.RE
.SH ATTRIBUTES
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability See below.
.TE
.sp
.LP
The command-line syntax is Evolving. The human-readable output is Unstable.
.SH SEE ALSO
\fBdtrace\fR(1M), \fBlockstat\fR(1M), \fBmutex_init\fR(3C),
\fBpthread_mutex_lock\fR(3C), \fBpthread_rwlock_rdlock\fR(3C),
\fBpthread_rwlock_wrlock\fR(3C), \fBpthread_rwlock_unlock\fR(3C),
\fBrwlock\fR(3C), \fBattributes\fR(5), \fBfasttrap\fR(7D)
.sp
.LP
\fIDynamic Tracing Guide\fR:
.sp
.LP
https://illumos.org/books/dtrace/
|