6f6fbdb2fc23cd34fee5ef86014108965456493e
[blktrace.git] / doc / btt.1
1 .TH BTT 1 "September 29, 2007" "blktrace git\-20070910192508" ""
2
3
4 .SH NAME
5 btt \- analyse block i/o traces produces by blktrace
6
7
8 .SH SYNOPSIS
9 .B btt 
10 [ \-a               | \-\-seek\-absolute ]
11 .br
12 [ \-A               | \-\-all\-data ]
13 .br
14 [ \-B <\fIoutput name\fR> | \-\-dump\-blocknos=<\fIoutput name\fR> ]
15 .br
16 [ \-d <\fIseconds\fR>     | \-\-range\-delta=<\fIseconds\fR> ]
17 .br
18 [ \-D <\fIdev;...\fR>     | \-\-devices=<\fIdev;...\fR> ]
19 .br
20 [ \-e <\fIexe,...\fR>     | \-\-exes=<\fIexe,...\fR>  ]
21 .br
22 [ \-h               | \-\-help ]
23 .br
24 [ \-i <\fIinput name\fR>  | \-\-input\-file=<\fIinput name\fR> ]
25 .br
26 [ \-I <\fIoutput name\fR> | \-\-iostat=<\fIoutput name\fR> ]
27 .br
28 [ \-l <\fIoutput name\fR> | \-\-d2c\-latencies=<\fIoutput name\fR> ]
29 .br
30 [ \-L <\fIfreq\fR>        | \-\-periodic\-latencies=<\fIfreq\fR> ]
31 .br
32 [ \-M <\fIdev map\fR>     | \-\-dev\-maps=<\fIdev map\fR>
33 .br
34 [ \-o <\fIoutput name\fR> | \-\-output\-file=<\fIoutput name\fR> ]
35 .br
36 [ \-p <\fIoutput name\fR> | \-\-per\-io\-dump=<\fIoutput name\fR> ]
37 .br
38 [ \-q <\fIoutput name\fR> | \-\-q2c\-latencies=<\fIoutput name\fR> ]
39 .br
40 [ \-Q <\fIoutput name\fR> | \-\-active\-queue\-depth=<\fIoutput name\fR> ]
41 .br
42 [ \-s <\fIoutput name\fR> | \-\-seeks=<\fIoutput name\fR> ]
43 .br
44 [ \-S <\fIinterval\fR>    | \-\-iostat\-interval=<\fIinterval\fR> ]
45 .br
46 [ \-t <\fIsec\fR>         | \-\-time\-start=<\fIsec\fR> ]
47 .br
48 [ \-T <\fIsec\fR>         | \-\-time\-end=<\fIsec\fR> ]
49 .br
50 [ \-u <\fIoutput name\fR> | \-\-unplug\-hist=<\fIoutput name\fR> ]
51 .br
52 [ \-v               | \-\-verbose ]
53 .br
54 [ \-V               | \-\-version ]
55 .br
56 [ \-z <\fIoutput name\fR> | \-\-q2d\-latencies=<\fIoutput name\fR> ]
57
58
59 .SH DESCRIPTION
60
61 btt is a post\-processing tool for the block layer IO tracing tool called
62 blktrace(8).  As noted in its documentation, blktrace 
63 is a block layer IO tracing mechanism which provides detailed
64 information about request queue operations up to user space.
65
66 btt will take in binary dump data from blkparse, and analyse the events,
67 producing a series of output from the analysis. It will also build .dat
68 files containing "range data" \-\- showing things like Q activity (periods
69 of time while Q events are being produced), C activity (likewise for
70 command completions), and etc.
71
72 Included with the distribution is a simple 3D plotting utility,
73 \fIbno_plot\fR, which can plot the block numbers btss outputs if the \fI-B\fR
74 option is specified. The display will display each IO generated, with the time
75 (seconds) along the X-axis, the block number (start) along the Y-axis and the
76 number of blocks transferred in the IO represented along the Z-axis.
77
78
79 .SH OPTIONS
80
81 .B \-a
82 .br
83 .B \-\-seek\-absolute
84 .RS 4
85 When specified on the command line, this directs btt to calculate
86 seek distances based solely upon the ending block address of one IO,
87 and the start of the next.  By default \fBbtt\fR uses the concept
88 of the closeness to either the beginning or end of the previous IO. See
89 the Users Manual for more details about seek distances.
90 .RE
91
92 .B \-A
93 .br
94 .B \-\-all\-data
95 .RS 4
96 Normally \fBbtt\fR will not print out verbose information concerning
97 per-process and per-device data.  If you desire that level of detail you can
98 specify this option.
99 .RE
100
101 .B \-B <\fIoutput name\fR>
102 .br
103 .B \-\-dump\-blocknos=<\fIoutput name\fR>
104 .RS 4
105 This option will output absolute block numbers to three files prefixed
106 by the specified output name:
107 .HP
108 .I prefix_device_r.dat
109 .br
110 All read block numbers are output, first column is time (seconds), second is
111 the block number, and the third column is the ending block number.
112 .HP
113 .I prefix_device_w.dat
114 .br
115 All write block numbers are output, first column is time (seconds), second is
116 the block number, and the third column is the ending block number.
117 .HP
118 .I prefix_device_c.dat
119 .br
120 All block numbers (read and write) are output, first column is time (seconds),
121 second is the block number, and the third column is the ending block number.
122 .RE
123
124 .B \-d <\fIseconds\fR>
125 .br
126 .B \-\-range\-delta=<\fIseconds\fR>
127 .RS 4
128 \fBbtt\fR outputs a file containing Q and C activity, the notion of active
129 traces simply means that there are Q or C traces occurring within a certain
130 period of each other. The default values is 0.1 seconds; with this option
131 allowing one to change that granularity. The smaller the value, the more data
132 points provided.
133 .RE
134
135 .B \-D <\fIdev;...\fR>
136 .br
137 .B \-\-devices=<\fIdev;...\fR>
138 .RS 4
139 Normally, \fBbtt\fR will produce data for all devices detected in the
140 traces parsed. With this option, one can reduce the analysis to one or more
141 devices provided in the string passed to this option. The device identifiers
142 are the major and minor number of each device, and each device identifier is
143 separated by a colon (:). A valid specifier for devices 8,0 and 8,8 would then
144 be: \fI8,0:8,8\fR.
145 .RE
146
147 .B \-e <\fIexe,...\fR>
148 .br
149 .B \-\-exes=<\fIexe,...\fR>
150 .RS 4
151 The \-e option supplies the list of executables that will have I/Os
152 analysed.
153 .RE
154
155 .B \-h
156 .br
157 .B \-\-help
158 .RS 4
159 Shows a short summary of possible command line option
160 .RE
161
162 .B \-i <\fIinput name\fR>
163 .br
164 .B \-\-input\-file <\fIinput file\fR>
165 .RS 4
166 Specifies the input file to analyse.  This should be a trace file produced
167 by \fIblktrace\fR (8).
168 .RE
169
170 .B \-I <\fIoutput name\fR>
171 .br
172 .B \-\-iostat=<\fIoutput name\fR>
173 .RS 4
174 The \-I option directs btt to output iostat\-like data to the specified
175 file.  Refer to the iostat (sysstat) documentation for details on the
176 data columns. 
177 .RE
178
179 .B \-l <\fIoutput name\fR>
180 .br
181 .B \-\-d2c\-latencies=<\fIoutput name\fR>
182 .RS 4
183 The \-l option allows one to output per\-IO D2C latencies
184 respectively. The supplied argument provides the basis for the output
185 name for each device.
186 .RE
187
188 .B \-L <\fIfreq\fR>
189 .br
190 .B \-\-periodic\-latencies=<\fIfreq\fR>
191 .RS 4
192 The \-L option allows one to output periodic latency information for both
193 Q2C and D2C latencies. The frequency specified will regulate how often
194 an average latency is output -- a floating point value expressing seconds.
195 .RE
196
197 .B \-M <\fIdev map\fR>
198 .br
199 .B \-\-dev\-maps=<\fIdev map\fR>
200 .RS 4
201 The \-M option takes in a file generated by the provided script
202 (gen_disk_info.py), and allows for better output of device names.
203 .RE
204
205 .B \-o <\fIoutput name\fR>
206 .br
207 .B \-\-output\-file=<\fIoutput name\fR>
208 .RS 4
209 Specifies the output file name.
210 .RE
211
212 .B \-p <\fIoutput name\fR>
213 .br
214 .B \-\-per\-io\-dump=<\fIoutput name\fR>
215 .RS 4
216 The \-p option will generate a file that contains a list of all IO
217 "sequences" \- showing the parts of each IO (Q, A, I/M, D, & C).
218 .RE
219
220 .B \-q <\fIoutput name\fR>
221 .br
222 .B \-\-q2c\-latencies=<\fIoutput name\fR>
223 .RS 4
224 The \-q option allows one to output per\-IO Q2C latencies
225 respectively. The supplied argument provides the basis for the output
226 name for each device.
227 .RE
228
229 .B \-Q <\fIoutput name\fR>
230 .br
231 .B \-\-active\-queue\-depth=<\fIoutput name\fR>
232 .RS 4
233 The \-Q option allows one to output data files showing the time stamp
234 and the depth of active commands (those issued but not completed).
235 .RE
236
237 .B \-s <\fIoutput name\fR>
238 .br
239 .B \-\-seeks=<\fIoutput name\fR>
240 .RS 4
241 The \-s option instructs btt to output seek data, the argument provided
242 is the basis for file names output. There are two files per device,
243 read seeks and write seeks.
244 .RE
245
246 .B \-S <\fIinterval\fR>
247 .br
248 .B \-\-iostat\-interval=<\fIinterval\fR>
249 .RS 4
250 The \-S option specifies the interval to use between data
251 output, it defaults to once per second.
252 .RE
253
254 .B \-t <\fIsec\fR>
255 .br
256 .B \-\-time\-start=<\fIsec\fR>
257 .br
258 .B \-T <\fIsec\fR>
259 .br
260 .B \-\-time\-end=<\fIsec\fR>
261 .RS 4
262 The \-t/\-T options allow one to set a start and/or end time for analysing
263 \- analysing will only be done for traces after \-t's argument and before
264 \-T's argument. (\-t and \-T are optional, so if you specify just \-t,
265 analysis will occur for all traces after the time specified. Similarly,
266 if only \-T is specified, analysis stops after \-T's seconds.)
267 .RE
268
269 .B \-u <\fIoutput name\fR>
270 .br
271 .B \-\-unplug\-hist=<\fIoutput name\fR>
272 .RS 4
273 This option instructs \fBbtt\fR to generate a data file containing histogram
274 information for unplug traces on a per device basis. It shows how many
275 times an unplug was hit with a specified number of IOs released. There are 21
276 output values into the file, as follows:
277
278 .RS 4
279 a value of 0 represents 0..4 counts
280 .br
281 a value of 1 represents 5..9 counts
282 .br
283 a value of 2 represents 10..14 counts
284 .br
285 etc, until
286 .br
287 a value of 20 represents 100+ counts
288 .br
289 .RE
290
291 The file name(s) generated use the text string passed as an argument for
292 the prefix, followed by the device identifier in \fImajor,minor\fR
293 form, with a \fI.dat\fR extension.  For example, with \fI\-u
294 up_hist\fR specified on the command line: \fIup_hist_008,032.dat\fR.
295 .RE
296
297 .B \-V
298 .br
299 .B \-\-version
300 .RS 4
301 Shows the version of btt.
302 .RE
303
304 .B \-v
305 .br
306 .B \-\-verbose
307 .RS 4
308 Requests a more verbose output.
309 .RE
310
311 .B \-z <\fIoutput name\fR>
312 .br
313 .B \-\-q2d\-latencies=<\fIoutput name\fR>
314 .RS 4
315 The \-z option allows one to output per\-IO Q2D latencies
316 respectively. The supplied argument provides the basis for the output
317 name for each device.
318 .RE
319
320
321 .SH AUTHORS
322 \fIbtt\fR was written by Alan D. Brunelle.  This man page was created
323 from the \fIblktrace\fR documentation by Bas Zoetekouw.
324
325
326 .SH "REPORTING BUGS"
327 Report bugs to <linux\-btrace@vger.kernel.org>
328
329 .SH COPYRIGHT
330 Copyright \(co 2006 Jens Axboe, Alan D. Brunelle and Nathan Scott.
331 .br
332 This is free software.  You may redistribute copies of it under the terms of
333 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
334 There is NO WARRANTY, to the extent permitted by law.
335 .br
336 This manual page was created for Debian by Bas Zoetekouw.  It was derived from
337 the documentation provided by the authors and it may be used, distributed and
338 modified under the terms of the GNU General Public License, version 2.
339 .br
340 On Debian systems, the text of the GNU General Public License can be found in
341 /usr/share/common\-licenses/GPL\-2.
342
343 .SH "SEE ALSO"
344 The btt Users Guide, which can be found in /usr/share/doc/blktrace/btt.pdf
345 .br
346 bno_plot (1), blktrace (8), blkparse (1), verify_blkparse (1), blkrawverify (1), btt (1)
347