Using blktrace tool

635 Views Asked by At

I'm using the blktrace tool to measure the input performance of the write and rewrite. The blktrace produces many files during the write. Do I need to merge all the files into a single file to give it to the blkparse to produce the readable format of the output.

1

There are 1 best solutions below

0
mrcl On

By running blktrace as root

blktrace /dev/sda

after pressing Cntrl+c, blktrace will generate a set of files

[sda.blktrace.0, sda.blktrace.1, ..., sda.blktrace.(Ncpus-1)]

according to the number of cpus your OS can see. To parse the files, you can use blkparse for all files simultaneously

blkparse sda.blktrace.0 sda.blktrace.1 ... sda.blktrace.(Ncpus-1)

or

blkparse sda.blktrace.*

Hope it helps.