#define SETBUFFER_SIZE (64 * 1024)
-#define S_OPTS "aAB:d:D:e:hi:I:l:L:m:M:o:p:q:Q:s:S:t:T:u:VvX"
+#define S_OPTS "aAB:d:D:e:hi:I:l:L:m:M:o:p:q:Q:s:S:t:T:u:VvXz:"
static struct option l_opts[] = {
{
.name = "seek-absolute",
.flag = NULL,
.val = 'X'
},
+ {
+ .name = "q2d-latencies",
+ .has_arg = required_argument,
+ .flag = NULL,
+ .val = 'z'
+ },
{
.name = NULL,
}
"[ -V | --version ]\n" \
"[ -v | --verbose ]\n" \
"[ -X | --easy-parse-avgs ]\n" \
+ "[ -z <output name> | --q2d-latencies=<output name> ]\n" \
"\n";
static struct file_info *arg_files = NULL;
case 'X':
easy_parse_avgs++;
break;
+ case 'z':
+ q2d_name = strdup(optarg);
+ break;
default:
usage(argv[0]);
exit(1);
#include <time.h>
#include "globals.h"
-char bt_timeline_version[] = "2.05";
+char bt_timeline_version[] = "2.06";
char *devices, *exes, *input_name, *output_name, *seek_name, *bno_dump_name;
char *d2c_name, *q2c_name, *per_io_name, *unplug_hist_name;
-char *sps_name, *aqd_name;
+char *sps_name, *aqd_name, *q2d_name;
FILE *ranges_ofp, *avgs_ofp, *xavgs_ofp, *per_io_ofp, *msgs_ofp;
int verbose, done, time_bounded, output_all_data, seek_absolute;
int easy_parse_avgs;
seeki_exit(dip->seek_handle);
seeki_exit(dip->q2q_handle);
aqd_exit(dip->aqd_handle);
+ plat_exit(dip->q2d_plat_handle);
plat_exit(dip->q2c_plat_handle);
plat_exit(dip->d2c_plat_handle);
bno_dump_exit(dip->bno_dump_handle);
dip->seek_handle = seeki_init(mkhandle(str, device, "_d2d"));
dip->q2q_handle = seeki_init(mkhandle(str, device, "_q2q"));
dip->aqd_handle = aqd_init(mkhandle(str, device, "_aqd"));
+ dip->q2d_plat_handle =
+ plat_init(mkhandle(str, device, "_q2d_plat"));
dip->q2c_plat_handle =
plat_init(mkhandle(str, device, "_q2c_plat"));
dip->d2c_plat_handle =
\title{\texttt{btt} User Guide}
\author{Alan D. Brunelle (Alan.Brunelle@hp.com)}
-\date{21 May 2008}
+\date{30 October 2008}
\begin{document}
\maketitle
than grepping through a blkparse output file for example). The
details on this file is included in section~\ref{sec:per-io}.
- \item[iostat] Latency information -- both Q2C and D2C --
+ \item[iostat] Latency information -- both Q2d, D2c and Q2C --
on a per-IO basis can be generated. These are described in
- sections~\ref{sec:lat-q2c} and~\ref{sec:lat-d2c}.
+ section~\ref{sec:lat}.
\item[seek details] A set of data files containing all IO-to-IO
sector differences can be output, with details found in
\item start block + number of blocks
\end{enumerate}
-\newpage\section{\label{sec:lat}\label{sec:lat-q2c}\label{sec:lat-d2c}Latency Data Files}
+\newpage\section{\label{sec:lat}\label{sec:lat-q2d}\label{sec:lat-q2c}\label{sec:lat-d2c}Latency Data Files}
The latency data files which can be optionally produced by \texttt{btt}
- provide per-IO latency information, one for total IO time (Q2C) and
- one for latencies induced by lower layer drivers and devices (D2C).
+ provide per-IO latency information, one for queue time (Q2D), one
+ for total IO time (Q2C) and one for latencies induced by lower layer
+ drivers and devices (D2C).
In both cases, the first column (X values) represent runtime (seconds),
while the second column (Y values) shows the actual latency for a
- command at that time (either Q2C or D2C).
+ command at that time (either Q2D, D2C or Q2C).
\newpage\section{\label{sec:seek}Seek Data Files}
\newpage\section{\label{sec:cmd-line}Command Line}
\begin{verbatim}
-Usage: btt 2.05
+Usage: btt 2.06
[ -a | --seek-absolute ]
[ -A | --all-data ]
[ -B <output name> | --dump-blocknos=<output name> ]
[ -V | --version ]
[ -v | --verbose ]
[ -X | --easy-parse-avgs ]
+[ -z <output name> | --q2d-latencies=<output name> ]
\end{verbatim}
\subsection{\label{sec:o-a}\texttt{--seek-absolute}/\texttt{-a}}
ARQ 8,16 12.938165321
\end{verbatim}
+\subsection{\label{sec:o-z}\texttt{--q2d-latencies}/\texttt{-l}}
+
+ This option instructs \texttt{btt} to generate the Q2D latency file
+ discussed in section~\ref{sec:lat-q2d}.
+
\newpage\section{\label{sec:bno_plot}bno\_plot.py}
Included with the distribution is a simple 3D plotting utility based
struct region_info regions;
struct devmap *map;
void *q2q_handle, *seek_handle, *bno_dump_handle, *unplug_hist_handle;
- void *q2d_priv, *aqd_handle, *q2c_plat_handle, *d2c_plat_handle;
- FILE *d2c_ofp, *q2c_ofp;
+ void *q2d_priv, *aqd_handle;
+ void *q2d_plat_handle, *q2c_plat_handle, *d2c_plat_handle;
+ FILE *q2d_ofp, *d2c_ofp, *q2c_ofp;
struct avgs_info avgs;
struct stats stats, all_stats;
__u64 last_q, n_qs, n_ds;
extern char bt_timeline_version[], *devices, *exes, *input_name, *output_name;
extern char *seek_name, *iostat_name, *d2c_name, *q2c_name, *per_io_name;
-extern char *bno_dump_name, *unplug_hist_name, *sps_name, *aqd_name;
+extern char *bno_dump_name, *unplug_hist_name, *sps_name, *aqd_name, *q2d_name;
extern double range_delta, plat_freq;
extern FILE *ranges_ofp, *avgs_ofp, *xavgs_ofp, *iostat_ofp, *per_io_ofp;
extern FILE *msgs_ofp;
/* latency.c */
void latency_init(struct d_info *dip);
void latency_clean(void);
+void latency_q2d(struct d_info *dip, __u64 tstamp, __u64 latency);
void latency_d2c(struct d_info *dip, __u64 tstamp, __u64 latency);
void latency_q2c(struct d_info *dip, __u64 tstamp, __u64 latency);
void latency_init(struct d_info *dip)
{
+ dip->q2d_ofp = latency_open(dip->device, q2d_name, "q2d");
dip->d2c_ofp = latency_open(dip->device, d2c_name, "d2c");
dip->q2c_ofp = latency_open(dip->device, q2c_name, "q2c");
}
clean_files(&all_files);
}
+void latency_q2d(struct d_info *dip, __u64 tstamp, __u64 latency)
+{
+ plat_x2c(dip->q2d_plat_handle, tstamp, latency);
+ latency_out(dip->q2d_ofp, tstamp, latency);
+}
+
void latency_d2c(struct d_info *dip, __u64 tstamp, __u64 latency)
{
plat_x2c(dip->d2c_plat_handle, tstamp, latency);
if (output_all_data)
q2d_histo_add(q_iop->dip->q2d_priv,
d_iop->t.time - q_iop->t.time);
+ latency_q2d(q_iop->dip, d_iop->t.time,
+ d_iop->t.time - q_iop->t.time);
}
}
[ \-v | \-\-verbose ]
.br
[ \-V | \-\-version ]
+.br
+[ \-z <\fIoutput name\fR> | \-\-q2d\-latencies=<\fIoutput name\fR> ]
.SH DESCRIPTION
Requests a more verbose output.
.RE
+.B \-z <\fIoutput name\fR>
+.br
+.B \-\-q2d\-latencies=<\fIoutput name\fR>
+.RS 4
+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.
+.RE
+
.SH AUTHORS
-\fIblkparse\fR was written by Jens Axboe, Alan D. Brunelle and Nathan Scott. This
-man page was created from the \fIblktrace\fR documentation by Bas Zoetekouw.
+\fIbtt\fR was written by Alan D. Brunelle. This man page was created
+from the \fIblktrace\fR documentation by Bas Zoetekouw.
.SH "REPORTING BUGS"