xref: /freebsd/cddl/usr.sbin/plockstat/plockstat.1 (revision 3b3a8eb937bf8045231e8364bfd1b94cd4a95979)
1.\"
2.\" Copyright (c) 2010 The FreeBSD Foundation
3.\" All rights reserved.
4.\"
5.\" This software was developed by Rui Paulo under sponsorship from the
6.\" FreeBSD Foundation.
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27.\" SUCH DAMAGE.
28.\"
29.\" $FreeBSD$
30.\"
31.Dd September 13, 2010
32.Dt PLOCKSTAT 1
33.Os
34.Sh NAME
35.Nm plockstat
36.Nd Trace pthread lock statistics using DTrace
37.Sh SYNOPSIS
38.Nm
39.Op Fl vACHV
40.Op Fl n Ar count
41.Op Fl s Ar depth
42.Op Fl e Ar secs
43.Op Fl x Ar opt Ns = Ns Ar val
44.Ar command
45.Op arg...
46.Nm
47.Op Fl vACHV
48.Op Fl n Ar count
49.Op Fl s Ar depth
50.Op Fl e Ar secs
51.Op Fl x Ar opt Ns = Ns Ar val
52.Fl p Ar pid
53.Sh DESCRIPTION
54The
55.Nm
56utility traces pthread locks (mutexes and rwlocks) and prints statistics about
57them.
58You can use
59.Nm
60to investigate bottlenecks in your software.
61.Pp
62The following options are available:
63.Bl -tag -width indent
64.It Fl v
65Be verbose.
66.It Fl A
67Print all statistics.
68.It Fl C
69Print commulative statistics (the default).
70.It Fl H
71Print a histogram.
72.It Fl V
73Print the DTrace script about to be used to stderr.
74.It Fl n Ar count
75Set the aggregation count for the data set.
76.It Fl s Ar depth
77Set the ustack (userland stack) caller depth.
78.It Fl e Ar secs
79Does nothing at the moment.
80.It Fl x Ar opt Ns = Ns Ar val
81Specify DTrace options.
82See the
83.Xr dtrace 1
84man page for more details.
85.El
86.Sh EXIT STATUS
87.Ex -std
88.Sh SEE ALSO
89.Xr dtrace 1 ,
90.Xr pthread 3
91.Sh HISTORY
92The
93.Nm
94utility comes from OpenSolaris and was first imported into
95.Fx 9.0 .
96