blktrace.git
11 years agoiowatcher: Make sure we add the xtick labels if we're only plotting IO
Chris Mason [Fri, 21 Sep 2012 18:03:50 +0000 (14:03 -0400)]
iowatcher: Make sure we add the xtick labels if we're only plotting IO

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Merge branch 'jan'
Chris Mason [Tue, 11 Sep 2012 01:01:02 +0000 (21:01 -0400)]
iowatcher: Merge branch 'jan'

Jan Kara's updates for xzoom and yzoom

Conflicts:
main.c

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add option to set action which should be displayed in the IO graph
Jan Kara [Thu, 6 Sep 2012 16:23:05 +0000 (18:23 +0200)]
iowatcher: Add option to set action which should be displayed in the IO graph

Sometimes this is useful to see how IO scheduler or storage itself
changes the IO submitted by the application.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Improve xticks logic
Jan Kara [Thu, 6 Sep 2012 10:45:34 +0000 (12:45 +0200)]
iowatcher: Improve xticks logic

Ticks on x axis used integral step and fixed number of ticks. That generates
wrong results e.g. for 13s long trace with 10 ticks... Allow the code to
somewhat alter the number of ticks and also use non-integral step.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add options to limit time and sector range
Jan Kara [Fri, 31 Aug 2012 09:37:49 +0000 (11:37 +0200)]
iowatcher: Add options to limit time and sector range

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Ignore trace records beyond max_seconds
Jan Kara [Thu, 6 Sep 2012 08:14:59 +0000 (10:14 +0200)]
iowatcher: Ignore trace records beyond max_seconds

Currently we report error when we find a trace record beyond max_seconds.
When we allow user to set end of displayed period, records after the end
of period are no longer a bug so just ignore them.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add possibility to limit seconds from below
Jan Kara [Wed, 5 Sep 2012 21:01:08 +0000 (23:01 +0200)]
iowatcher: Add possibility to limit seconds from below

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Rename seconds to max_seconds
Jan Kara [Wed, 5 Sep 2012 20:08:24 +0000 (22:08 +0200)]
iowatcher: Rename seconds to max_seconds

Later we will add min_seconds to complement this.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add support for limitting IO graph offset from below
Jan Kara [Sat, 1 Sep 2012 21:31:46 +0000 (23:31 +0200)]
iowatcher: Add support for limitting IO graph offset from below

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Fix filtering of outliers from below
Jan Kara [Sat, 1 Sep 2012 21:37:20 +0000 (23:37 +0200)]
iowatcher: Fix filtering of outliers from below

There are lots of trace actions which do not carry a sector with them (e.g.
plug, unplug, ...). Thus sector is 0 for them and that results in trimming
of outliers from below never working. Fix the problem by accounting only
Queue events in the outlier statistics.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Define mask of trace action and use it instead of opencoding the constant
Jan Kara [Sat, 1 Sep 2012 21:35:55 +0000 (23:35 +0200)]
iowatcher: Define mask of trace action and use it instead of opencoding the constant

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Fix typo in option description
Jan Kara [Thu, 30 Aug 2012 13:59:01 +0000 (15:59 +0200)]
iowatcher: Fix typo in option description

Short variant of --movie is -m, not -p.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Check for null mpstat structs while generating plots
Chris Mason [Fri, 31 Aug 2012 00:42:30 +0000 (20:42 -0400)]
iowatcher: Check for null mpstat structs while generating plots

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add -c to split the graphs up into multiple columns
Chris Mason [Tue, 28 Aug 2012 06:15:11 +0000 (02:15 -0400)]
iowatcher: Add -c to split the graphs up into multiple columns

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Fix divide by zero while calculating averages
Chris Mason [Mon, 27 Aug 2012 22:27:59 +0000 (18:27 -0400)]
iowatcher: Fix divide by zero while calculating averages

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Update the README and the --help output
Chris Mason [Mon, 27 Aug 2012 22:09:57 +0000 (18:09 -0400)]
iowatcher: Update the README and the --help output

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Start support for multiple colums of plots
Chris Mason [Mon, 27 Aug 2012 21:39:58 +0000 (17:39 -0400)]
iowatcher: Start support for multiple colums of plots

The movie mode is updated to put extra plots on
the side.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Fix io line graphs at the edge of the X axis
Chris Mason [Mon, 27 Aug 2012 17:00:30 +0000 (13:00 -0400)]
iowatcher: Fix io line graphs at the edge of the X axis

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Fix the line graphs for values near the edges of the graph
Chris Mason [Mon, 27 Aug 2012 16:53:51 +0000 (12:53 -0400)]
iowatcher: Fix the line graphs for values near the edges of the graph

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Fix mpstat file permissions
Chris Mason [Mon, 27 Aug 2012 16:22:28 +0000 (12:22 -0400)]
iowatcher: Fix mpstat file permissions

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add initial support for flash tracing
Chris Mason [Fri, 24 Aug 2012 18:31:29 +0000 (14:31 -0400)]
iowatcher: Add initial support for flash tracing

This is incomplete, but it will catch messages from
the flash driver to find the actual chip an IO
was sent to.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add a new movie mode that maps the IOs onto a platter.
Chris Mason [Tue, 21 Aug 2012 19:19:35 +0000 (15:19 -0400)]
iowatcher: Add a new movie mode that maps the IOs onto a platter.

The --movie option defaults to spindle mode now,
but you can choose --movie=rect or --movie=spindle
as well.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Switch to ffmpeg for movie encoding. Chrome and vlc like these better.
Chris Mason [Tue, 21 Aug 2012 13:18:15 +0000 (09:18 -0400)]
iowatcher: Switch to ffmpeg for movie encoding.  Chrome and vlc like these better.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add back missing plot title
Chris Mason [Mon, 20 Aug 2012 20:15:55 +0000 (16:15 -0400)]
iowatcher: Add back missing plot title

11 years agoiowatcher: Fix --help definition
Chris Mason [Mon, 20 Aug 2012 19:30:38 +0000 (15:30 -0400)]
iowatcher: Fix --help definition

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add mpstat.[ch] into git
Chris Mason [Mon, 20 Aug 2012 18:36:19 +0000 (14:36 -0400)]
iowatcher: Add mpstat.[ch] into git

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add movie support
Chris Mason [Fri, 17 Aug 2012 16:18:28 +0000 (12:18 -0400)]
iowatcher: Add movie support

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add mpstat graphing support
Chris Mason [Thu, 16 Aug 2012 18:46:33 +0000 (14:46 -0400)]
iowatcher: Add mpstat graphing support

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Initial revision
Chris Mason [Wed, 15 Aug 2012 20:10:55 +0000 (16:10 -0400)]
iowatcher: Initial revision

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
12 years agoblktrace 1.0.5 origin blktrace-1.0.5
Jens Axboe [Mon, 27 Feb 2012 07:22:17 +0000 (08:22 +0100)]
blktrace 1.0.5

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoToo small arrays for file names
Vasily Tarasov [Mon, 27 Feb 2012 07:21:11 +0000 (08:21 +0100)]
Too small arrays for file names

In our experiments blktrace/blkparse file names encode a lot of
infomation about the particular experiment.  We noticed that for long
enough file names blkparse does not work.

The reason is that per_cpu_info->fname[] is of 128 bytes. As a result,
in setup_file() function only part of the file name gets to ->fname[].
Then stat() fails and we exit the function. Notice, that no error is
printed in this case.

In the following patch ->fname[] size is increased to POSIX defined
PATH_MAX.

Signed-off-by: Vasily Tarasov <tarasov@vasily.name
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoFix compiler warnings
Jens Axboe [Wed, 1 Feb 2012 12:17:57 +0000 (13:17 +0100)]
Fix compiler warnings

One was a real bug, assigned i_time twice instead of c_time (which was
left unitialized).

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoavoid string overflows
Eric Sandeen [Fri, 16 Dec 2011 19:36:56 +0000 (13:36 -0600)]
avoid string overflows

Several places using strcpy would benefit from strncpy
for safety.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoblktrace: remove unused variable
Eric Sandeen [Fri, 16 Dec 2011 19:27:33 +0000 (13:27 -0600)]
blktrace: remove unused variable

sp was being incremented w/o initialization, but thankfully
not used otherwise.  Just remove it.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoblkparse: initialize cpu_map
Eric Sandeen [Fri, 16 Dec 2011 19:25:16 +0000 (13:25 -0600)]
blkparse: initialize cpu_map

We malloc'd cpu_map, and then did:

cpu_map[CPU_IDX(cpu)] |= (1UL << CPU_BIT(cpu));

... not sure how that ever worked if cpu_map was not initialized!

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agobtt: close devmap file after processing
Eric Sandeen [Fri, 16 Dec 2011 19:17:52 +0000 (13:17 -0600)]
btt: close devmap file after processing

Close the file used for btt's -M argument after
processing.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix several leaks on error paths
Eric Sandeen [Fri, 16 Dec 2011 19:15:54 +0000 (13:15 -0600)]
Fix several leaks on error paths

In several cases space is allocated for a filename but
not freed if open of that file fails.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoRemove extraneous malloc in find_input routines
Eric Sandeen [Fri, 16 Dec 2011 19:13:21 +0000 (13:13 -0600)]
Remove extraneous malloc in find_input routines

No point in malloc()ing space if we just immediately overwrite
the pointer via strdup.  That'll leak some space.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoClose stream in 'I' switch handling
Eric Sandeen [Fri, 16 Dec 2011 19:11:33 +0000 (13:11 -0600)]
Close stream in 'I' switch handling

The file containing the list of devices was never closed
after processing was complete.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFree pdu_buff on bad pdu path in process()
Eric Sandeen [Fri, 16 Dec 2011 19:08:14 +0000 (13:08 -0600)]
Free pdu_buff on bad pdu path in process()

On this error path, pdu_buf was never freed.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix potential array overrun in act_to_str
Eric Sandeen [Fri, 16 Dec 2011 19:06:31 +0000 (13:06 -0600)]
Fix potential array overrun in act_to_str

The acts[] array is only N_ACTS elements, so we should not
ever set acts[N_ACTS]

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoCheck setvbuf return value
Eric Sandeen [Fri, 16 Dec 2011 19:05:02 +0000 (13:05 -0600)]
Check setvbuf return value

Check for setvbuf failure.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoblktrace 1.0.4 blktrace-1.0.4
Jens Axboe [Tue, 31 Jan 2012 09:53:21 +0000 (10:53 +0100)]
blktrace 1.0.4

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoMerge branch 'master' of ssh://brick.kernel.dk/data/git/blktrace
Jens Axboe [Tue, 31 Jan 2012 09:52:25 +0000 (10:52 +0100)]
Merge branch 'master' of ssh://brick.kernel.dk/data/git/blktrace

12 years agoFix for realloc bug and wrong error logging
Mikulas Patocka [Tue, 31 Jan 2012 09:51:50 +0000 (10:51 +0100)]
Fix for realloc bug and wrong error logging

This patch fixes two bugs in blktrace.

1. realloc is called on a wrong memory address (glibc reports heap
corruption if the user sends the output to a pipe, for example "blktrace
/dev/sdc -o -").

2. errno 0 is actually reported if debugfs is not mounted

Mikulas

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoblktrace 1.0.3 blktrace-1.0.3
Jens Axboe [Thu, 11 Aug 2011 10:49:08 +0000 (12:49 +0200)]
blktrace 1.0.3

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdd FLUSH/FUA support
Namhyung Kim [Thu, 11 Aug 2011 10:48:07 +0000 (12:48 +0200)]
Add FLUSH/FUA support

Add FLUSH/FUA support to blktrace. As FLUSH precedes WRITE and/or
FUA follows WRITE, use the same 'F' flag for both cases and
distinguish them by their (relative) position. The end results
look like (other flags might be shown also):

 - WRITE:            W
 - WRITE_FLUSH:      FW
 - WRITE_FUA:        WF
 - WRITE_FLUSH_FUA:  FWF

Note that we reuse TC_BARRIER due to lack of bit space of act_mask.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoMerge branch 'master' of ssh://router.home.kernel.dk/data/git/blktrace
Jens Axboe [Wed, 3 Aug 2011 13:06:18 +0000 (15:06 +0200)]
Merge branch 'master' of ssh://router.home.kernel.dk/data/git/blktrace

12 years agoblkparse: fix up incorrect pc write completion count
Jeff Moyer [Wed, 3 Aug 2011 13:05:55 +0000 (15:05 +0200)]
blkparse: fix up incorrect pc write completion count

I noticed in some traces that I was seeing summaries like the following:

Total (sde):
 Reads Queued:          76,      304KiB  Writes Queued:      16,384,    1,048MiB
 Read Dispatches:       76,      304KiB  Write Dispatches:    2,210,    1,048MiB
 Reads Requeued:         0               Writes Requeued:         0
 Reads Completed:       76,      304KiB  Writes Completed:    2,210,    1,048MiB
 Read Merges:            0,        0KiB  Write Merges:       14,174,  907,136KiB
 PC Reads Queued:        0,        0KiB  PC Writes Queued:        0,        0KiB
 PC Read Disp.:          4,        0KiB  PC Write Disp.:          0,        0KiB
 PC Reads Req.:          0               PC Writes Req.:          0
 PC Reads Compl.:        4               PC Writes Compl.:    2,210
 IO unplugs:         2,124               Timer unplugs:           0

Note how there were no PC Writes dispatched, but there were 2210
completed.  It turns out to be a minor typo in the code.  The attached
patch fixes the reporting for me.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoblktrace: Use be32_to_cpu for blk_io_trace->cpu.
Tao Ma [Thu, 26 May 2011 19:11:09 +0000 (21:11 +0200)]
blktrace: Use be32_to_cpu for blk_io_trace->cpu.

blk_io_trace->cpu is u32, so use be32_to_cpu instead.

Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoblkparse: Avoid segfault for wrong cpu number.
Tao Ma [Thu, 26 May 2011 19:11:07 +0000 (21:11 +0200)]
blkparse: Avoid segfault for wrong cpu number.

Currently we only check the magic number to see whether
a blktrace is valid or not, but Bill Broadley did meet
with a case that the cpu info is wrong with a number
of 1725552676. So in resize_cpu_info, we meet with a
overflow when calculating
size = new_count * sizeof(struct per_cpu_info);
And the program will be either segfault or has the error
of out of memory. Although this is more likely a kernel
problem, the blkparse shoudn't segfault for it.

So this patch just check whether the cpu stored in the
trace is the same as the file, if not, just warn it out
and skip it.

Cc: Jens Axboe <axboe@kernel.dk>
Reported-by: Bill Broadley <bill@broadley.org>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoblktrace 1.0.2 blktrace-1.0.2
Jens Axboe [Wed, 16 Mar 2011 08:06:30 +0000 (09:06 +0100)]
blktrace 1.0.2

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoblktrace: Document default values for -b and -n
Justin TerAvest [Wed, 16 Mar 2011 08:05:09 +0000 (09:05 +0100)]
blktrace: Document default values for -b and -n

To help users better deal with the log message
 "You have dropped events, consider using a larger buffer size (-b)",
it's helpful to list the defaults for sub buffer management, without
flags.

Signed-off-by: Justin TerAvest <teravest@google.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agogitignore: add blkiomon to .gitignore.
Tao Ma [Wed, 9 Feb 2011 09:22:39 +0000 (10:22 +0100)]
gitignore: add blkiomon to .gitignore.

Add blkiomon, btreplay/btrecord and btreplay/btreplay to
.gitignore so that they don't show up in "Untracked files.

Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoblktrace: remove unused idx from devpath.
Tao Ma [Wed, 9 Feb 2011 09:22:39 +0000 (10:22 +0100)]
blktrace: remove unused idx from devpath.

idx isn't used, so remove it.

Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoblktrace: break mlock in case of is_done.
Tao Ma [Wed, 9 Feb 2011 09:22:39 +0000 (10:22 +0100)]
blktrace: break mlock in case of is_done.

In 38-rc2, there is a bug in mlock which will return
error in mlock of blktrace(I have sent the corresponding
patch to the lkml). So when we try to break the blktrace
by "ctrl+c", mlock will loop forever and in the end, I
have to use "kill -9" to kill it and then run "blktrace -k"
to stop the tracer. I don't think it is good.

How to reproduce it is simple:
Use a 38-rc kernel, and run
blktrace /dev/sdx
then use "ctrl+c", it doesn't exit.

So this patch adds the check for tp->is_done. In
case of is_done is set, break mlock so that we don't
deadloop in the mlock. In case of the real mlock error,
I will let it to retry 10 times and it should succeed
after 10 tries in case of tp->is_done. If tp isn't set
or tp->is_done isn't set, it works like the original
design.

Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoblkiomon: Fix an output error
Tao Ma [Fri, 14 Jan 2011 08:06:03 +0000 (09:06 +0100)]
blkiomon: Fix an output error

When we give out some statistics in blkiomon, we don't consider
the situation that the device has no correspoinding action. See
if there is no disk read during the interval, the output in my box is
like:
sizes read (bytes): num 0, min -1, max 0, sum 0, squ 0, avg nan, var nan

With the fix, now it looks like:
sizes read (bytes): num 0, min -1, max 0, sum 0, squ 0, avg 0.0, var 0.0

Cc: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoMerge branch 'master' of ssh://router.home.kernel.dk/data/git/blktrace
Jens Axboe [Tue, 11 Jan 2011 07:36:21 +0000 (08:36 +0100)]
Merge branch 'master' of ssh://router.home.kernel.dk/data/git/blktrace

13 years agoblkparse: Fix blktrace output pipe broken in the new kernel
Tao Ma [Tue, 11 Jan 2011 07:35:56 +0000 (08:35 +0100)]
blkparse: Fix blktrace output pipe broken in the new kernel

With the newest kernel(say 2.6.37, some older one should also have the
similar problem), some cfq messages are added to blktrace, so it makes
the old blkparse broken.

See a simple example:
1. blktrace /dev/sdb -o -|blkparse -i -
2. Run the following command(/dev/sdb1 is mounted at /mnt/test_dir):
dd if=/mnt/test_dir/test of=/dev/null bs=4k count=1 iflag=direct

There are only 2 lines of output there:
  8,16   0        1     0.000000000 13183  A   R 114759 + 8 <- (8,17) 114696
  8,16   0        2     0.000000491 13183  Q   R 114759 + 8 [dd]

And even we run a command line like:
for((i=0;i<100;i++))do dd if=/mnt/ocfs2/test of=/dev/null bs=4k count=1 iflag=direct;done
We are only given the same 2 lines of output.

While the really one should look like:
  8,16   0        1     0.000000000 13319  A   R 114759 + 8 <- (8,17) 114696
  8,16   0        2     0.000000376 13319  Q   R 114759 + 8 [dd]
  8,16   0        0     0.000005931     0  m   N cfq13319 alloced
  8,16   0        3     0.000006259 13319  G   R 114759 + 8 [dd]
  8,16   0        4     0.000007143 13319  P   N [dd]
  8,16   0        5     0.000007817 13319  I   R 114759 + 8 [dd]
  8,16   0        0     0.000008491     0  m   N cfq13319 insert_request
  8,16   0        0     0.000009029     0  m   N cfq13319 add_to_rr
...

The main reason is that in show_entries_rb, we test sequences every time,
but actually with some messages like cfq, the sequence number is always
0 which makes the old sequence check refuses all the logs after it.
So only check/store sequence number if it isn't a message.

Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoFixed build warning for btreplay
Alan D. Brunelle [Mon, 29 Nov 2010 15:34:30 +0000 (10:34 -0500)]
Fixed build warning for btreplay

btreplay.c:1332: warning: comparison between signed and unsigned integer
expressions

13 years agoblktrace: btt documentation update
Edward Shishkin [Fri, 22 Oct 2010 18:52:29 +0000 (20:52 +0200)]
blktrace: btt documentation update

Fixup for RH bugzilla 595628.

Document btt options:
-m (--seeks-per-second);
-X (--easy-parse-avgs).

Signed-off-by: Edward Shishkin <edward@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoblktrace: btreplay man pages update
Edward Shishkin [Fri, 30 Jul 2010 14:05:04 +0000 (16:05 +0200)]
blktrace: btreplay man pages update

Fixup for RH bugzilla 595623
Document btreplay option -x (--acc-factor)

Signed-off-by: Edward Shishkin <edward@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoblktrace: blktrace documentation update
Edward Shishkin [Fri, 22 Oct 2010 18:51:22 +0000 (20:51 +0200)]
blktrace: blktrace documentation update

Fixup for RH bugzilla 595620.

Document undocumented blktrace options.
Update the man pages.

Signed-off-by: Edward Shishkin <edward@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoblktrace: blkparse documentation update
Edward Shishkin [Fri, 30 Jul 2010 14:04:36 +0000 (16:04 +0200)]
blktrace: blkparse documentation update

Fixup for RH bugzilla 595615.

Document blkparse options:
-A, --set-mask,
-a, --act-mask,
-D. --input-directory

Signed-off-by: Edward Shishkin <edward@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoblktrace: blkiomon documentation update
Edward Shishkin [Fri, 30 Jul 2010 14:04:24 +0000 (16:04 +0200)]
blktrace: blkiomon documentation update

Fixup for RH bugzilla 595419.

Document blkiomon option -d (--dump-lldd).
Add drv_data mask description to blktrace man page.

Signed-off-by: Edward Shishkin <edward@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoblktrace: btrecord man pages fixup
Edward Shishkin [Fri, 30 Jul 2010 14:04:13 +0000 (16:04 +0200)]
blktrace: btrecord man pages fixup

Fix up for RH bugzilla 595413

Mistake in the man page for btrecord:
documented option --input-base is unsupported,
supported option --max-bunch-time is undocumented.

Signed-off-by: Edward Shishkin <edward@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoblktrace: disallow -o when using multiple devices
Alan D. Brunelle [Thu, 16 Sep 2010 13:26:22 +0000 (09:26 -0400)]
blktrace: disallow -o when using multiple devices

Document that "-o" does not work when specyfing multiple devices to
blktrace, also: enforce this by stopping blktrace when one tries do
do this.

The technical reason why "-o" doesn't work with multiple devices is
because we use multiple threads of execution - one per device/CPU pair -
and each of them opens a file named "<prefix>.blktrace.<cpu>". With the
"-o" all of the "<prefix>" values are the same - so multiple threads
open the same file and try to do output. Not good. Without the "-o"
we get unique files named: "<device>.blktrace.<cpu>"  - as the tuple
(<device>,<cpu>) is unique.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
14 years agoblktrace: disable kill option - take 2
Edward Shishkin [Tue, 20 Apr 2010 13:41:14 +0000 (15:41 +0200)]
blktrace: disable kill option - take 2

Fixup for 513950.

Problem:
'blktrace -d <device> -k' does not kill a running
backgound trace. Executing 'blktrace -d <device> -k'
for the second time results in "BLKTRACETEARDOWN:
Invalid argument" message and then each run of
blktrace on that machine prints the following output:
BLKTRACESETUP: No such file or directory.

The bug:
The option -k results in clobbering information
about running trace by kernel (blk_trace_remove),
while resources (files open in debugfs by the running
background blktrace) are not released.

Solution:
Update documentation:
Undocument the non-working "kill" option. Advise
to send SIGINT signall via kill(1) to the running
background blktrace for its correct termination.

Signed-off-by: Edward Shishkin <edward@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblktrace: update blkiomon doc
Edward Shishkin [Tue, 15 Dec 2009 17:48:12 +0000 (18:48 +0100)]
blktrace: update blkiomon doc

Fixup for 499398.

Description of problem:

blkiomon does not understand the output of blktrace when
working with logical volume device (it is quiet, while
working with physical device it prints IO statistics as
expected).

BUG (or design feature?):
/dev/dm-* and /dev/md* don't see BLK_TC_COMPLETE actions:

        /* we need an older D trace and a younger C trace */
        if (t_old->bit.action & BLK_TC_ACT(BLK_TC_ISSUE) &&
            t_young->bit.action & BLK_TC_ACT(BLK_TC_COMPLETE)) {
                /* matching D and C traces - update statistics */
                match++;
                blkiomon_account(&t_old->bit, &t_young->bit);
                blkiomon_free_trace(t_stored);
                return t;
        }

Possible solution:
Update documentation.

Signed-off-by: Edward Shishkin <edward@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblktrace: add back conversion
Edward Shishkin [Tue, 15 Dec 2009 17:47:59 +0000 (18:47 +0100)]
blktrace: add back conversion

Fixup for bz 502889.

Problem:
when executing with /dev/cciss/foo (long path names)
btreplay complains (No such file or directory).

Bug:
Missed back conversion of erscores to slashes.

Solution:
Convert underscores to slashes to restore device
names that have larger paths.

Signed-off-by: Edward Shishkin <edward@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblktrace: print correct usage
Edward Shishkin [Tue, 15 Dec 2009 17:47:53 +0000 (18:47 +0100)]
blktrace: print correct usage

Fixup for 498898:

Problem:
When somebody runs blktrace without parameters, it
shows the usage message. The usage message suggests
that version number "x.y.z" is a required parameter,
which is not true.

Solution:
Don't print version number when running
blktrace, blkparce, btt without parameters.

Signed-off-by: Edward Shishkin <edward@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblktrace: avoid device duplication
Edward Shishkin [Tue, 15 Dec 2009 17:47:47 +0000 (18:47 +0100)]
blktrace: avoid device duplication

Fixup for bz 501457.

Problem:
If the device list file contains the same device
as supplied on the command line, blktrace stops
immediately and further I/O tracing is impossible.

Bug: device duplication in the devpaths ends with
programm termination (BLKTRACESETUP ioctl returns
error) while resources (open files in debugfs) are
not released.

Solution:
Make sure devices are not duplicated in devpaths
pool.

Signed-off-by: Edward Shishkin <edward@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoMerge branch 'master' of ssh://router.home.kernel.dk/data/git/blktrace
Jens Axboe [Mon, 19 Apr 2010 17:15:27 +0000 (19:15 +0200)]
Merge branch 'master' of ssh://router.home.kernel.dk/data/git/blktrace

14 years agoblkparse: exit with error if no tracefiles found
Eric Sandeen [Mon, 19 Apr 2010 17:15:23 +0000 (19:15 +0200)]
blkparse: exit with error if no tracefiles found

If no tracefiles are found, exit with non-0 status

Resolves Red Hat Bugzilla #500118

Reported-by: Milos Malik <mmalik@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoFixed incorrect sizeof instead of strlen in btt/rstats.c
Alan D. Brunelle [Mon, 22 Mar 2010 14:21:12 +0000 (10:21 -0400)]
Fixed incorrect sizeof instead of strlen in btt/rstats.c

14 years agoCorrected memory leak in btt/p_live.c
Alan D. Brunelle [Mon, 22 Mar 2010 14:20:21 +0000 (10:20 -0400)]
Corrected memory leak in btt/p_live.c

Forgot to free record when updating rather than adding.

14 years agoadd libpthread to btreplay/Makefile LIBS
Eric Sandeen [Mon, 22 Feb 2010 18:56:52 +0000 (19:56 +0100)]
add libpthread to btreplay/Makefile LIBS

Fedora linking changes picked this up:

/usr/bin/ld: btreplay.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
/usr/bin/ld: note: 'pthread_create@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line

See also https://bugzilla.redhat.com/show_bug.cgi?id=564775

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agobtt: Added in I/O activity per device and system-wide
Alan D. Brunelle [Thu, 8 Oct 2009 18:12:12 +0000 (14:12 -0400)]
btt: Added in I/O activity per device and system-wide

It now keeps track of I/O activity on a per-device basis (as well as a
cumulative system-wide view). ``I/O activity'' is defined as defined as
the time during which the device driver and device are activelty working
on at least one I/O. Here's a sample output:

==================== I/O Active Period Information ====================

       DEV |     # Live      Avg. Act     Avg. !Act % Live
---------- | ---------- ------------- ------------- ------
 (254,  0) |          0   0.000000000   0.000000000   0.00
 (  8, 17) |          0   0.000000000   0.000000000   0.00
 (  8, 16) |         29   0.909596815   0.094646263  90.87
 (  8, 33) |          0   0.000000000   0.000000000   0.00
 (  8, 32) |        168   0.097848226   0.068231948  59.06
---------- | ---------- ------------- ------------- ------
 Total Sys |         33   0.799808811   0.082334758  90.92

Also added a new btt -Z option that generates per-device and system-wide
I/O activity data that can be plotted.

Refer to the documentation updates (btt.1, btt.tex) for more information.

14 years agobtt: better data file naming
Alan D. Brunelle [Thu, 8 Oct 2009 12:39:02 +0000 (08:39 -0400)]
btt: better data file naming

More logical naming for .dat files created.

Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
14 years agoMerge branch 'master' of ssh://router.home.kernel.dk/data/git/blktrace
Jens Axboe [Tue, 1 Sep 2009 08:24:24 +0000 (10:24 +0200)]
Merge branch 'master' of ssh://router.home.kernel.dk/data/git/blktrace

14 years agoblkparse: allow stdout output with -d option (using '-' as the filename)
Jens Axboe [Tue, 1 Sep 2009 08:24:01 +0000 (10:24 +0200)]
blkparse: allow stdout output with -d option (using '-' as the filename)

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoAdded in running stats documentation
Alan D. Brunelle [Fri, 14 Aug 2009 17:01:08 +0000 (13:01 -0400)]
Added in running stats documentation

14 years agoAdded in running stats for btt
Alan D. Brunelle [Fri, 14 Aug 2009 17:00:27 +0000 (13:00 -0400)]
Added in running stats for btt

Create an overall system and per-device statistics file containing
MB-per-second and I/Os-per-second values. Format for each file is first
column contains an (integer) time stamp (seconds since start of run)
and a (double) value.

File names are:

sys_mbps_fp.dat - system-wide mbps (for all devices watched, of course)
sys_iops_fp.dat - I/Os per sec

Each device watched will have a file with the device preceeding the
_mbps or _iops section of the above file names.

14 years agoVersion 1.0.1 blktrace-1.0.1
Jens Axboe [Mon, 11 May 2009 12:00:10 +0000 (14:00 +0200)]
Version 1.0.1

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkrawverify: warn and return error if no traces are found
Eric Sandeen [Thu, 7 May 2009 16:08:25 +0000 (11:08 -0500)]
blkrawverify: warn and return error if no traces are found

blkrawverify is prints no errors and returns success if the
requested tracefiles aren't found:

# blkrawverify foobar
Verifying foobar
# echo $?
0

With this change it's a bit more informative:

# ./blkrawverify foobar
Verifying foobar
No tracefiles found for foobar
# echo $?
1

Resolves Red Hat Bugzilla #499581

Reported-by: Milos Malik <mmalik@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkiomon manpage and usage reference invalid "msg-queue-name" option
Eric Sandeen [Mon, 4 May 2009 21:04:51 +0000 (16:04 -0500)]
blkiomon manpage and usage reference invalid "msg-queue-name" option

the blkiomon usage text and man page reference a
"msg-queue-name" option, but getopts is only looking
for "msg-qeueue" - fix the docs to match the code.

Reported-by: Milos Malik <mmalik@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agofix up btrace options & manpage
Eric Sandeen [Mon, 4 May 2009 20:40:53 +0000 (15:40 -0500)]
fix up btrace options & manpage

The btrace script & man page didn't quite match for options,
and the btrace script was missing a few options in the getopts
specification (b&n).  Also, there seems to be no such thing as
a "summarize" option anywhere, so remove it.

Reported-by: /Milos Malik <mmalik@redhat.com <mailto:mmalik@redhat.com>>/
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agomore manpage fixups
Eric Sandeen [Mon, 4 May 2009 20:16:31 +0000 (15:16 -0500)]
more manpage fixups

Fix various typos & inconsistencies in man pages.

I think the manpages could use a general tidy-up, but this
mostly fixes things which I'd consider "errors" vs. style
issues.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agofix max-pkts option inconsistencies
Eric Sandeen [Thu, 30 Apr 2009 15:56:04 +0000 (10:56 -0500)]
fix max-pkts option inconsistencies

This is for RH bug 498426,
btrecord doesn't recognize --max-pkts and --max-packets cmd line options

Usage text and some documentation references "--max-pkts" and
the man page references "--max-packets" but the getopts code
is looking for --max_pkts.

I'm not sure if it's best to make the code match the majority
of the docs, or fix the docs to match the code?  This patch does
the former, but I'm not picky if you want to go the other way :)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoConverted to using the correct remap entries
Alan D. Brunelle [Thu, 30 Apr 2009 17:10:31 +0000 (13:10 -0400)]
Converted to using the correct remap entries

This follows the kernel changes to the blk_io_trace_remap structure to
better align the names of the structure elements with the real intent of
"from" and "to" (devices & sectors).

See the kernel patches @

http://lkml.org/lkml/2009/4/30/340
http://lkml.org/lkml/2009/4/30/341

(Note: since the ABI order didn't change, old user code will work with
the new kernel code & vice versa.)

Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblkiomon: fix unaligned accesses on ia64
Martin Peschke [Mon, 11 May 2009 06:41:33 +0000 (08:41 +0200)]
blkiomon: fix unaligned accesses on ia64

commit 7aa3ebcec011bfe9cc60d6476252c03376a37551 packed
the blkiomon_stat structure so that traces from one
arch could be analyzed on another (in truth only x86
is different, at least from x86_64/ia64/ppc/ppc64/s390/s390x)

Moving the __u32 device member instead of a new padding field should be
fine.

Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agofix off-by-one issues in blkiomon.h
Martin Peschke [Mon, 20 Apr 2009 14:07:11 +0000 (16:07 +0200)]
fix off-by-one issues in blkiomon.h

Fix two off-by-one issues. Last bucket of histogram was ommitted by mistake
when being converted to big-endian or when being merged with another bucket.

Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agofix include statement in stats.h
Martin Peschke [Mon, 20 Apr 2009 14:05:18 +0000 (16:05 +0200)]
fix include statement in stats.h

Some endianess conversion macros have been moved and the corresponding
header file is gone. Need to adapt an include statement in stats.h. The
compiler did not complain because blkiomon.c accidently included blktrace.h
prior to stats.h. Introduced by blktrace rewrite which became version 2.

Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agohandle race to mkdir at startup
Jeff Moyer [Fri, 17 Apr 2009 06:50:22 +0000 (08:50 +0200)]
handle race to mkdir at startup

I ran into a problem when specifying -D dirname-that-doesnt-yet-exist.
Blktrace would fail, spewing the following messages:

[root@megadeth blktrace]# ./blktrace -d /dev/cciss/c0d1 -D ./2.6.30-rc2-cfq-local
Destination dir ./2.6.30-rc2-cfq-local/ can't be made: 17/File exists
Destination dir ./2.6.30-rc2-cfq-local/ can't be made: 17/File exists
Destination dir ./2.6.30-rc2-cfq-local/ can't be made: 17/File exists
Destination dir ./2.6.30-rc2-cfq-local/ can't be made: 17/File exists
Destination dir ./2.6.30-rc2-cfq-local/ can't be made: 17/File exists
FAILED to start thread on CPU 0: 1/Operation not permitted
FAILED to start thread on CPU 4: 1/Operation not permitted
FAILED to start thread on CPU 5: 1/Operation not permitted
FAILED to start thread on CPU 6: 1/Operation not permitted
FAILED to start thread on CPU 7: 1/Operation not permitted

I tracked it down to the fact that there is no synchronization between
threads when trying to create the output directory.  The fix is simple,
just allow the race to happen and detect it.  It's not really worth
putting in any extra synchronization.  It looks like no place else in
that startup path needs synchronization either.

This patch fixes the issue for me.  I tested it by running the very
command that caused me headaches 100% of the time before.  I also did a
chattr +i on the directory and verified that it would really fail in the
case where it couldn't create the directory.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoFixed plug/unplug logic in btt
Alan D. Brunelle [Mon, 6 Apr 2009 11:30:16 +0000 (07:30 -0400)]
Fixed plug/unplug logic in btt

Was not accounting for unplugged time due to timeout unplugs.

15 years agoWorking on fixing % time q plugged
Alan D. Brunelle [Thu, 2 Apr 2009 16:09:08 +0000 (12:09 -0400)]
Working on fixing % time q plugged

15 years agofix trivial typo in manpage
Eric Sandeen [Thu, 26 Mar 2009 19:44:06 +0000 (20:44 +0100)]
fix trivial typo in manpage

Fix small typo as reported by Kent Baxley <kbaxley@redhat.com>
in Red Hat Bug 489941 - tiny typo in blktrace manpage

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <axboe@carl.(none)>
15 years agoAdd NOTIFY to activity mask
Carl Henrik Lunde [Fri, 6 Feb 2009 11:17:25 +0000 (12:17 +0100)]
Add NOTIFY to activity mask

Allow masking in messages by using "-a notify".

Signed-off-by: Carl Henrik Lunde <chlunde@ping.uio.no>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoBlktrace failed to lock reader threads on the cpu used by the corresponding
Tom Zanussi [Mon, 23 Mar 2009 18:41:00 +0000 (19:41 +0100)]
Blktrace failed to lock reader threads on the cpu used by the corresponding
writer. This resulted in stale data being consumed when blktrace accidently
read at a position that was being written to at the same time. This issue
surfaced as "bad trace magic" warnings emitted by blktrace tools.

The problem occured on an SMP System z machine. The patch fixes the issue.

Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <axboe@carl.(none)>
15 years agoGenerate matplotlib plots for btt generated data
Alan D. Brunelle [Thu, 12 Mar 2009 14:29:40 +0000 (10:29 -0400)]
Generate matplotlib plots for btt generated data

btt_plot.py: Generate matplotlib plots for BTT generated data files

Files handled:
  AQD   - Average Queue Depth           Running average of queue depths

  BNOS  - Block numbers accessed        Markers for each block

  Q2D   - Queue to Issue latencies      Running averages
  D2C   - Issue to Complete latencies   Running averages
  Q2C   - Queue to Complete latencies   Running averages

Usage:
  btt_plot_aqd.py       equivalent to: btt_plot.py -t aqd
  btt_plot_bnos.py      equivalent to: btt_plot.py -t bnos
  btt_plot_q2d.py       equivalent to: btt_plot.py -t q2d
  btt_plot_d2c.py       equivalent to: btt_plot.py -t d2c
  btt_plot_q2c.py       equivalent to: btt_plot.py -t q2c

Arguments:
  [ -A          | --generate-all   ] Default: False
  [ -L          | --no-legend      ] Default: Legend table produced
  [ -o <file>   | --output=<file>  ] Default: <type>.png
  [ -T <string> | --title=<string> ] Default: Based upon <type>
  [ -v          | --verbose        ] Default: False
  <data-files...>

  The -A (--generate-all) argument is different: when this is specified,
  an attempt is made to generate default plots for all 5 types (aqd, bnos,
  q2d, d2c and q2c). It will find files with the appropriate suffix for
  each type ('aqd.dat' for example). If such files are found, a plot for
  that type will be made. The output file name will be the default for
  each type. The -L (--no-legend) option will be obeyed for all plots,
  but the -o (--output) and -T (--title) options will be ignored.