1plockstat(1M) System Administration Commands plockstat(1M)
2
3
4
6 plockstat - report user-level lock statistics
7
9 plockstat [-vACHV] [-n count] [-s depth] [-e secs]
10 [-x arg [=val]] command [arg]...
11
12
13 plockstat [-vACHV] [-n count] [-s depth] [-e secs]
14 [-x arg [=val]] -p pid
15
16
18 The plockstat utility gathers and displays user-level locking statis‐
19 tics. By default, plockstat monitors all lock contention events, gath‐
20 ers frequency and timing data about those events, and displays the data
21 in decreasing frequency order, so that the most common events appear
22 first.
23
24
25 plockstat gathers data until the specified command completes or the
26 process specified with the -p option completes.
27
28
29 plockstat relies on DTrace to instrument a running process or a command
30 it invokes to trace events of interest. This imposes a small but mea‐
31 surable performance overhead on the processes being observed. Users
32 must have the dtrace_proc privilege and have permission to observe a
33 particular process with plockstat. Refer to the for more information
34 about DTrace security features.
35
37 The following options are supported:
38
39 -A Watch all lock events. This option is equivalent to
40 -CH.
41
42
43 -C Watch contention events.
44
45
46 -H Watch hold events.
47
48
49 -e secs Exit after the number of seconds specified have
50 elapsed.
51
52
53 -n count Display only the specified number of entries for each
54 output category.
55
56
57 -s depth Record a stack trace rather than just the calling func‐
58 tion.
59
60
61 -p pid Specify a process ID from which plockstat is to gather
62 data.
63
64
65 -v Print out a message to indicate that tracing has
66 started.
67
68
69 -x arg[=val] Enable or modify a DTrace runtime option or D compiler
70 option. The list of options is found in the Solaris
71 Dynamic Tracing Guide. Boolean options are enabled by
72 specifying their name. Options with values are set by
73 separating the option name and value with an equals
74 sign (=).
75
76
77 -V Print the Dtrace commands used to gather the data. The
78 output can then be used directly with the dtrace(1M)
79 command.
80
81
83 The following operands are supported:
84
85 arg A string to be passed as an argument to command.
86
87
88 command The name of a utility to be invoked.
89
90
91 count A positive integer value.
92
93
94 pid A process identifier for a process to be monitored.
95
96
97 secs Duration specified as a positive integer number of seconds.
98
99
101 The following exit values are returned:
102
103 0 Successful completion.
104
105
106 >0 An error occurred.
107
108
110 See attributes(5) for descriptions of the following attributes:
111
112
113
114
115 ┌─────────────────────────────┬─────────────────────────────┐
116 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
117 ├─────────────────────────────┼─────────────────────────────┤
118 │Availability │SUNWdtrc │
119 ├─────────────────────────────┼─────────────────────────────┤
120 │Interface Stability │See below. │
121 └─────────────────────────────┴─────────────────────────────┘
122
123
124 The command-line syntax is Evolving. The human-readable output is
125 Unstable.
126
128 dtrace(1M), lockstat(1M), mutex_init(3C), pthread_mutex_lock(3C),
129 pthread_rwlock_rdlock(3C), pthread_rwlock_wrlock(3C),
130 pthread_rwlock_unlock(3C), rwlock(3C), attributes(5), fasttrap(7D)
131
132
133
134
135
136
137SunOS 5.11 26 Jan 2009 plockstat(1M)