From 80c27cbe67449fb2e4bdb682002d87f2f0c07e72 Mon Sep 17 00:00:00 2001 From: Alan David Brunelle Date: Thu, 21 Sep 2006 09:17:02 +0200 Subject: [PATCH] [PATCH] Cleaned up old LVM/MD references, cleaned up btt/README. Signed-off-by: Alan D. Brunelle Signed-off-by: Jens Axboe --- btt/README | 45 ++++++++++++++++++++++++++++----------------- btt/args.c | 24 +++--------------------- btt/bt_timeline.c | 1 - btt/globals.h | 2 +- 4 files changed, 32 insertions(+), 40 deletions(-) diff --git a/btt/README b/btt/README index 23eac04..41ecdc4 100644 --- a/btt/README +++ b/btt/README @@ -6,37 +6,48 @@ Alan D. Brunelle (initial version) Usage ----- -$ btt -i (-l | -m) [-d ] [-D ] - [-e ] [-h] [-M map information] [-o ] - [-v] [-V] +Usage: btt + [ -d | --range-delta= ] + [ -D | --devices= ] + [ -e | --exes= ] + [ -h | --help ] + [ -i | --input-file= ] + [ -I | --iostat= ] + [ -M | --dev-maps= + [ -o | --output-file= ] + [ -s | --seeks= ] + [ -S | --iostat-interval= ] + [ -V | --version ] + [ -v | --verbose ] -You are required to: +You are required to specify an input file (-i) -o Specify an input file (-i) - -o Specify MD (-m) or LVM2/DM (-l) devices present (If no software RAID - devices, use -m.) This is a workaround for issues between LVM2 and MD - remap events that needs to be cleaned up. [DM devices are not working - as of right now, always specify -m for individual disks and/or MD - devices.] - -The -d argument allows you to specify the granularity which dtermines +The -d option allows you to specify the granularity which determines "activity" with regard to the .dat files -- this specific the time (in seconds) that must elapse without a particular event occuring to signify inactivity. The larger the number, the fewer ranges output -- the default is 0.1 seconds. -The -D argument supplies the devices which should be looked at when +The -D option supplies the devices which should be looked at when analyzing the input. This is a ":" separated list of devices, devices are specified by a mjr,mnr tuple (e.g.: -D "8,0:8,8" specifies two devices with major 8 and minor 0 and 8 respectively). -The -e argument supplies the list of executables that will have I/Os +The -e option supplies the list of executables that will have I/Os analyzed. -The -M argument takes in a file generated by the provided script +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. The -S option specifies the interval to use between data +output, it defaults to once per second. + +The -M option takes in a file generated by the provided script (gen_disk_info.py), and allows for better output of device names. +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. + Overview -------- @@ -54,4 +65,4 @@ The list is called linux-btrace@vger.kernel.org, subscribe by sending a mail to majordomo@vger.kernel.org with 'subscribe linux-btrace' in the mail body. -2006-05-17, Alan D. Brunelle +2006-09_18, Alan D. Brunelle diff --git a/btt/args.c b/btt/args.c index a198da2..7b4d0ee 100644 --- a/btt/args.c +++ b/btt/args.c @@ -28,7 +28,7 @@ #include "globals.h" -#define S_OPTS "d:D:e:hi:I:lmM:o:s:S:Vv" +#define S_OPTS "d:D:e:hi:I:M:o:s:S:Vv" static struct option l_opts[] = { { .name = "range-delta", @@ -66,18 +66,6 @@ static struct option l_opts[] = { .flag = NULL, .val = 'I' }, - { - .name = "lvm", - .has_arg = no_argument, - .flag = NULL, - .val = 'l' - }, - { - .name = "md", - .has_arg = no_argument, - .flag = NULL, - .val = 'm' - }, { .name = "dev-maps", .has_arg = required_argument, @@ -121,11 +109,11 @@ static struct option l_opts[] = { static char usage_str[] = \ "\n[ -d | --range-delta= ]\n" \ + "[ -D | --devices= ]\n" \ "[ -e | --exes= ]\n" \ "[ -h | --help ]\n" \ "[ -i | --input-file= ]\n" \ "[ -I | --iostat= ]\n" \ - "(-l | -m) | (--lvm | -md)\n" \ "[ -M | --dev-maps=\n" \ "[ -o | --output-file= ]\n" \ "[ -s | --seeks= ]\n" \ @@ -164,12 +152,6 @@ void handle_args(int argc, char *argv[]) case 'I': iostat_name = optarg; break; - case 'l': - is_lvm = 1; - break; - case 'm': - is_lvm = 0; - break; case 'M': dev_map_fname = optarg; break; @@ -197,7 +179,7 @@ void handle_args(int argc, char *argv[]) } } - if (input_name == NULL || is_lvm < 0) { + if (input_name == NULL) { usage(argv[0]); exit(1); } diff --git a/btt/bt_timeline.c b/btt/bt_timeline.c index ce5662e..9e69fe5 100644 --- a/btt/bt_timeline.c +++ b/btt/bt_timeline.c @@ -33,7 +33,6 @@ char *output_name = NULL; char *seek_name = NULL; double range_delta = 0.1; FILE *ranges_ofp, *avgs_ofp; -int is_lvm = -1; int verbose = 0; int ifd; unsigned long n_traces, n_io_allocs, n_io_frees; diff --git a/btt/globals.h b/btt/globals.h index dcb25a6..de67e04 100644 --- a/btt/globals.h +++ b/btt/globals.h @@ -207,7 +207,7 @@ extern char bt_timeline_version[], *devices, *exes, *input_name, *output_name; extern char *seek_name, *iostat_name; extern double range_delta; extern FILE *ranges_ofp, *avgs_ofp, *iostat_ofp; -extern int is_lvm, verbose, ifd; +extern int verbose, ifd; extern unsigned int n_devs; extern unsigned long n_traces, n_io_allocs, n_io_frees; extern struct list_head all_devs, all_ios, all_procs; -- 2.25.1