summaryrefslogtreecommitdiff
path: root/usr/src/man/man1m/latencytop.1m
blob: e0c7e7ee8859dc40bc03f0f4a759403990162703 (plain)
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
'\" 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 LATENCYTOP 1M "Sep 29, 2009"
.SH NAME
latencytop \- report latency-related statistics in system and in applications
.SH SYNOPSIS
.LP
.nf
\fBlatencytop\fR [\fB-t\fR \fIinterval\fR] [\fB-o\fR \fIlog_file\fR] [\fB-k\fR \fIlog_level\fR]
     [\fB-f\fR [no]\fIfeature\fR,...] [\fB-l\fR \fIlog_interval\fR] [\fB-h\fR]
.fi

.SH DESCRIPTION
.sp
.LP
LatencyTOP is an observability tool that reports statistics about latencies in
the system and in applications. The tool reports statistics about where and
what kind of latencies are happening in the system and in the applications that
are running on the system. The statistics then can be used to improve
performance throughput of applications and system, as you remove the identified
latencies.
.sp
.LP
The tool analyzes system activity periodically and displays the data in the
output window. Two types of latencies are tracked: an LWP going in and out of
sleep and an LWP spinning order to acquire a synchronization object. The tool
uses the Solaris DTrace framework to collect the statistics corresponding to
these two scenarios of inactivity of the system and application LWPs.
.sp
.LP
The output window is divided into two sections. An upper part displays the
system-wide statistics, while the lower part displays statistics about
individual processes. The user can navigate the list of processes (using the
left- and right-arrow keys) and select the list they are interested in. The
tool will then display statistics about that selected process in the lower part
of the window. If the t or T key is pressed, the tool displays the LWP-specific
view of that selected process. The t or T key can be used to toggle between the
process-view and the thread-view.
.sp
.LP
During execution, a user can force a refresh of the analysis by pressing the r
or R key. The interval time is restored to the default or to a specified value
(if -t was used). To quit the application, the user must press the q or Q key.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB-f\fR, \fB--feature\fR [\fBno\fR]\fIfeature1\fR,[\fBno\fR]\fIfeature2\fR,...
.ad
.sp .6
.RS 4n
Enables/disables features in LatencyTOP. Features can be only one of the
following:
.sp
.ne 2
.na
[\fBno\fR]\fBfilter\fR
.ad
.sp .6
.RS 4n
Filter large interruptible latencies, for example, sleep. The default is
\fBoff\fR.
.RE

.sp
.ne 2
.na
[\fBno\fR]\fBsched\fR
.ad
.sp .6
.RS 4n
Monitors \fBsched\fR (PID=0). The default is \fBoff\fR.
.RE

.sp
.ne 2
.na
[\fBno\fR]\fBsobj\fR
.ad
.sp .6
.RS 4n
Monitors synchronize objects. The default is \fBon\fR.
.RE

.sp
.ne 2
.na
[\fBno\fR]\fBlow\fR
.ad
.sp .6
.RS 4n
Lower overhead by sampling small latencies. Enabling this feature will lower
CPU utilization by estimating small latencies statistically. Use it for heavy
workloads such as a very busy web server. The default is \fBoff\fR.
.RE

.RE

.sp
.ne 2
.na
\fB\fB-h\fR\fR
.ad
.sp .6
.RS 4n
Displays the command's usage.
.RE

.sp
.ne 2
.na
\fB\fB-k\fR \fIlog_level\fR\fR
.ad
.sp .6
.RS 4n
Specifies the level of logging in the log file. Valid values are:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 5n
\fBnone\fR (default)
.RE

.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.RS 5n
\fBunknown\fR
.RE

.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.RS 5n
\fBall\fR
.RE

.RE

.sp
.ne 2
.na
\fB\fB-l\fR [\fIlog_interval\fR]\fR
.ad
.sp .6
.RS 4n
Writes data to the log file every \fIlog_interval\fR seconds;
\fIlog_interval\fR must be greater than 60.
.RE

.sp
.ne 2
.na
\fB\fB-o\fR \fIlog_file\fR\fR
.ad
.sp .6
.RS 4n
Specifies the log file where output will be written. The default log file is
\fB/var/log/latencytop.log\fR.
.RE

.sp
.ne 2
.na
\fB\fB-t\fR \fIinterval\fR\fR
.ad
.sp .6
.RS 4n
Specifies the interval, in seconds, at which the tool collects statistics from
the system. The possible values are between 1 and 60; the default is 5 seconds.
.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRRunning the Tool
.sp
.LP
The following command launches the tool with default values for options.

.sp
.in +2
.nf
% \fBlatencytop\fR
.fi
.in -2
.sp

.LP
\fBExample 2 \fRSetting the Interval
.sp
.LP
The following command sets the sampling interval to two seconds.

.sp
.in +2
.nf
% \fBlatencytop -t 2\fR
.fi
.in -2
.sp

.LP
\fBExample 3 \fRSpecifying the Log File
.sp
.LP
The following command sets the log file to \fB/tmp/latencytop.log\fR.

.sp
.in +2
.nf
% \fBlatencytop -o /tmp/latencytop.log\fR
.fi
.in -2
.sp

.LP
\fBExample 4 \fRSpecifying the Log Level
.sp
.LP
The following command sets the log level to \fBall\fR.

.sp
.in +2
.nf
% \fBlatencytop -l 2\fR
.fi
.in -2
.sp

.LP
\fBExample 5 \fREnabling Tracing of Latencies
.sp
.LP
The following command enables the tracing of latencies caused by
synchronization objects.

.sp
.in +2
.nf
% \fBlatencytop -f sobj\fR
.fi
.in -2
.sp

.SH EXIT STATUS
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.sp .6
.RS 4n
Successful operation.
.RE

.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.sp .6
.RS 4n
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
_
Architecture	x86, SPARC
_
Interface Stability	Volatile
.TE

.SH SEE ALSO
.sp
.LP
\fBdtrace\fR(1M), \fBkstat\fR(1M), \fBattributes\fR(5)
.SH USAGE
.sp
.LP
You must have DTrace privileges to run LatencyTOP.