# btt

## NAME



           btt - analyse block i/o traces produces by blktrace
    


## SYNOPSIS



           **btt**
           [ -a               | --seek-absolute ]
           [ -A               | --all-data ]
           [ -B <_output name_ > | --dump-blocknos=<_output name_ > ]
           [ -d <_seconds_ >     | --range-delta=<_seconds_ > ]
           [ -D <_dev;..._ >     | --devices=<_dev;..._ > ]
           [ -e <_exe,..._ >     | --exes=<_exe,..._ >  ]
           [ -h               | --help ]
           [ -i <_input name_ >  | --input-file=<_input name_ > ]
           [ -I <_output name_ > | --iostat=<_output name_ > ]
           [ -l <_output name_ > | --d2c-latencies=<_output name_ > ]
           [ -L <_freq_ >        | --periodic-latencies=<_freq_ > ]
           [ -m <_output name_ > | --seeks-per-second=<_output name_ > ]
           [ -M <_dev map_ >     | --dev-maps=<_dev map_ >
           [ -o <_output name_ > | --output-file=<_output name_ > ]
           [ -p <_output name_ > | --per-io-dump=<_output name_ > ]
           [ -P <_output name_ > | --per-io-trees=<_output name_ > ]
           [ -q <_output name_ > | --q2c-latencies=<_output name_ > ]
           [ -Q <_output name_ > | --active-queue-depth=<_output name_ > ]
           [ -r               | --no-remaps ]
           [ -s <_output name_ > | --seeks=<_output name_ > ]
           [ -S <_interval_ >    | --iostat-interval=<_interval_ > ]
           [ -t <_sec_ >         | --time-start=<_sec_ > ]
           [ -T <_sec_ >         | --time-end=<_sec_ > ]
           [ -u <_output name_ > | --unplug-hist=<_output name_ > ]
           [ -v               | --verbose ]
           [ -V               | --version ]
           [ -X               | --easy-parse-avgs ]
           [ -z <_output name_ > | --q2d-latencies=<_output name_ > ]
           [ -Z               | --do-active ]
    


## DESCRIPTION



           btt is a post-processing tool for the block layer IO tracing tool
           called blktrace(8).  As noted in its documentation, blktrace is a
           block layer IO tracing mechanism which provides detailed
           information about request queue operations up to user space.
    
           btt will take in binary dump data from blkparse, and analyse the
           events, producing a series of output from the analysis. It will
           also build .dat files containing "range data" -- showing things
           like Q activity (periods of time while Q events are being
           produced), C activity (likewise for command completions), and etc.
    
           Included with the distribution is a simple 3D plotting utility,
           _bno_plot_ , which can plot the block numbers btt outputs if the _-B_
           option is specified. The display will display each IO generated,
           with the time (seconds) along the X-axis, the block number (start)
           along the Y-axis and the number of blocks transferred in the IO
           represented along the Z-axis.
    


## OPTIONS



           **-a**
           **--seek-absolute**
               When specified on the command line, this directs btt to
               calculate seek distances based solely upon the ending block
               address of one IO, and the start of the next.  By default **btt**
               uses the concept of the closeness to either the beginning or
               end of the previous IO. See the Users Manual for more details
               about seek distances.
    
           **-A**
           **--all-data**
               Normally **btt** will not print out verbose information concerning
               per-process and per-device data.  If you desire that level of
               detail you can specify this option.
    
           **-B <**_output name_ >
           **--dump-blocknos= <**_output name_ >
               This option will output absolute block numbers to three files
               prefixed by the specified output name:
    
               _prefix_device_r.dat_
                      All read block numbers are output, first column is time
                      (seconds), second is the block number, and the third
                      column is the ending block number.
    
               _prefix_device_w.dat_
                      All write block numbers are output, first column is
                      time (seconds), second is the block number, and the
                      third column is the ending block number.
    
               _prefix_device_c.dat_
                      All block numbers (read and write) are output, first
                      column is time (seconds), second is the block number,
                      and the third column is the ending block number.
    
           **-d <**_seconds_ >
           **--range-delta= <**_seconds_ >
               **btt** outputs a file containing Q and C activity, the notion of
               active traces simply means that there are Q or C traces
               occurring within a certain period of each other. The default
               values is 0.1 seconds; with this option allowing one to change
               that granularity. The smaller the value, the more data points
               provided.
    
           **-D <**_dev;..._ >
           **--devices= <**_dev;..._ >
               Normally, **btt** will produce data for all devices detected in
               the traces parsed. With this option, one can reduce the
               analysis to one or more devices provided in the string passed
               to this option. The device identifiers are the major and minor
               number of each device, and each device identifier is separated
               by a colon (:). A valid specifier for devices 8,0 and 8,8
               would then be: _8,0:8,8_.
    
           **-e <**_exe,..._ >
           **--exes= <**_exe,..._ >
               The -e option supplies the list of executables that will have
               I/Os analysed.
    
           **-h**
           **--help**
               Shows a short summary of possible command line option
    
           **-i <**_input name_ >
           **--input-file <**_input file_ >
               Specifies the input file to analyse.  This should be a trace
               file produced by _blktrace_ (8).
    
           **-I <**_output name_ >
           **--iostat= <**_output name_ >
               The -I option directs btt to output iostat-like data to the
               specified file.  Refer to the iostat (sysstat) documentation
               for details on the data columns.
    
           **-l <**_output name_ >
           **--d2c-latencies= <**_output name_ >
               The -l option allows one to output per-IO D2C latencies
               respectively. The supplied argument provides the basis for the
               output name for each device.
    
           **-L <**_freq_ >
           **--periodic-latencies= <**_freq_ >
               The -L option allows one to output periodic latency
               information for both Q2C and D2C latencies. The frequency
               specified will regulate how often an average latency is output
               -- a floating point value expressing seconds.
    
           **-m <**_output name_ >
           **--seeks-per-second= <**_output name_ >
               Trigger btt to output seeks-per-second information. The first
               column will contain a time value (seconds), and the second
               column  will indicate the number of seeks per second at that
               point.
    
           **-M <**_dev map_ >
           **--dev-maps= <**_dev map_ >
               The -M option takes in a file generated by the provided script
               (gen_disk_info.py), and allows for better output of device
               names.
    
           **-o <**_output name_ >
           **--output-file= <**_output name_ >
               Specifies the output file name.
    
           **-p <**_output name_ >
           **--per-io-dump= <**_output name_ >
               The -p option will generate a file that contains a list of all
               IO "sequences" - showing the parts of each IO (Q, A, I/M, D, &
               C).
    
           **-P <**_output name_ >
           **--per-io-trees= <**_output name_ >
               The -P option will generate a file that contains a list of all
               IO "sequences" - showing only the Q, D & C operation times.
               The D & C time values are separated from the Q time values
               with a vertical bar.
    
           **-q <**_output name_ >
           **--q2c-latencies= <**_output name_ >
               The -q option allows one to output per-IO Q2C latencies
               respectively. The supplied argument provides the basis for the
               output name for each device.
    
           **-Q <**_output name_ >
           **--active-queue-depth= <**_output name_ >
               The -Q option allows one to output data files showing the time
               stamp and the depth of active commands (those issued but not
               completed).
    
           **-r**
           **--no-remaps**
               Ignore remap traces; older kernels did not implement the full
               remap PDU.
    
           **-s <**_output name_ >
           **--seeks= <**_output name_ >
               The -s option instructs btt to output seek data, the argument
               provided is the basis for file names output. There are two
               files per device, read seeks and write seeks.
    
           **-S <**_interval_ >
           **--iostat-interval= <**_interval_ >
               The -S option specifies the interval to use between data
               output, it defaults to once per second.
    
           **-t <**_sec_ >
           **--time-start= <**_sec_ >
           **-T <**_sec_ >
           **--time-end= <**_sec_ >
               The -t/-T options allow one to set a start and/or end time for
               analysing - analysing will only be done for traces after -t's
               argument and before -T's argument. (-t and -T are optional, so
               if you specify just -t, analysis will occur for all traces
               after the time specified. Similarly, if only -T is specified,
               analysis stops after -T's seconds.)
    
           **-u <**_output name_ >
           **--unplug-hist= <**_output name_ >
               This option instructs **btt** to generate a data file containing
               histogram information for unplug traces on a per device basis.
               It shows how many times an unplug was hit with a specified
               number of IOs released. There are 21 output values into the
               file, as follows:
    
                   a value of 0 represents 0..4 counts
                   a value of 1 represents 5..9 counts
                   a value of 2 represents 10..14 counts
                   etc, until
                   a value of 20 represents 100+ counts
    
               The file name(s) generated use the text string passed as an
               argument for the prefix, followed by the device identifier in
               _major,minor_ form, with a _.dat_ extension.  For example, with _-u_
               _up_hist_ specified on the command line: _up_hist_008,032.dat_.
    
           **-V**
           **--version**
               Shows the version of btt.
    
           **-v**
           **--verbose**
               Requests a more verbose output.
    
           **-X**
           **--easy-parse-avgs**
               Provide data in an easy-to-parse form and write it to a file
               with .avg exentsion
    
           **-z <**_output name_ >
           **--q2d-latencies= <**_output name_ >
               The -z option allows one to output per-IO Q2D latencies
               respectively. The supplied argument provides the basis for the
               output name for each device.
    
           **-Z**
           **--do-active**
               The -Z will output files containing data which can be plotted
               showing per-device (and total system) I/O activity.
    


* * *