cb34095d8e
illumos-gate revision 13742:b6bbdd77139c Obtained from: ssh://anonhg@hg.illumos.org/illumos-gate
239 lines
4.7 KiB
Plaintext
239 lines
4.7 KiB
Plaintext
'\" 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 "Jan 26, 2009"
|
|
.SH NAME
|
|
plockstat \- report user-level lock statistics
|
|
.SH SYNOPSIS
|
|
.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]] \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
|
|
.sp
|
|
.LP
|
|
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 \fI\fR for more information about DTrace
|
|
security features.
|
|
.SH OPTIONS
|
|
.sp
|
|
.LP
|
|
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 \fISolaris Dynamic 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
|
|
.sp
|
|
.LP
|
|
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
|
|
.sp
|
|
.LP
|
|
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
|
|
.sp
|
|
.LP
|
|
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
|
|
.sp
|
|
.LP
|
|
\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
|
|
\fI\fR
|