2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH PLOCKSTAT 1M "Jan 26, 2009"
8 plockstat \- report user-level lock statistics
12 \fBplockstat\fR [\fB-vACHV\fR] [\fB-n\fR \fIcount\fR] [\fB-s\fR \fIdepth\fR] [\fB-e\fR \fIsecs\fR]
13 [\fB-x\fR \fIarg\fR [=val]] \fIcommand\fR [\fIarg\fR]...
18 \fBplockstat\fR [\fB-vACHV\fR] [\fB-n\fR \fIcount\fR] [\fB-s\fR \fIdepth\fR] [\fB-e\fR \fIsecs\fR]
19 [\fB-x\fR \fIarg\fR [=val]] \fB-p\fR \fIpid\fR
25 The \fBplockstat\fR utility gathers and displays user-level locking statistics.
26 By default, \fBplockstat\fR monitors all lock contention events, gathers
27 frequency and timing data about those events, and displays the data in
28 decreasing frequency order, so that the most common events appear first.
31 \fBplockstat\fR gathers data until the specified command completes or the
32 process specified with the \fB-p\fR option completes.
35 \fBplockstat\fR relies on DTrace to instrument a running process or a command
36 it invokes to trace events of interest. This imposes a small but measurable
37 performance overhead on the processes being observed. Users must have the
38 \fBdtrace_proc\fR privilege and have permission to observe a particular process
39 with \fBplockstat\fR. Refer to the \fI\fR for more information about DTrace
44 The following options are supported:
51 Watch all lock events. This option is equivalent to \fB-CH\fR.
60 Watch contention events.
75 \fB\fB-e\fR \fIsecs\fR\fR
78 Exit after the number of seconds specified have elapsed.
84 \fB\fB-n\fR \fIcount\fR\fR
87 Display only the specified number of entries for each output category.
93 \fB\fB-s\fR \fIdepth\fR\fR
96 Record a stack trace rather than just the calling function.
102 \fB\fB-p\fR \fIpid\fR\fR
105 Specify a process ID from which \fBplockstat\fR is to gather data.
114 Print out a message to indicate that tracing has started.
120 \fB\fB-x\fR \fIarg\fR[=\fIval\fR]\fR
123 Enable or modify a DTrace runtime option or D compiler option. The list of
124 options is found in the \fISolaris Dynamic Tracing Guide\fR. Boolean options
125 are enabled by specifying their name. Options with values are set by separating
126 the option name and value with an equals sign (\fB=\fR).
135 Print the Dtrace commands used to gather the data. The output can then be used
136 directly with the \fBdtrace\fR(1M) command.
142 The following operands are supported:
149 A string to be passed as an argument to \fIcommand\fR.
158 The name of a utility to be invoked.
167 A positive integer value.
176 A process identifier for a process to be monitored.
185 Duration specified as a positive integer number of seconds.
191 The following exit values are returned:
198 Successful completion.
213 See \fBattributes\fR(5) for descriptions of the following attributes:
221 ATTRIBUTE TYPE ATTRIBUTE VALUE
223 Interface Stability See below.
228 The command-line syntax is Evolving. The human-readable output is Unstable.
232 \fBdtrace\fR(1M), \fBlockstat\fR(1M), \fBmutex_init\fR(3C),
233 \fBpthread_mutex_lock\fR(3C), \fBpthread_rwlock_rdlock\fR(3C),
234 \fBpthread_rwlock_wrlock\fR(3C), \fBpthread_rwlock_unlock\fR(3C),
235 \fBrwlock\fR(3C), \fBattributes\fR(5), \fBfasttrap\fR(7D)