[Disksim-users] Converting blktrace output into Disksim input

Peter Macko pmacko at eecs.harvard.edu
Thu Dec 6 14:20:17 EST 2012


Hi,

One way to do this is to find a sensible set of blkparse arguments and then add support for this format directly do disksim. For example, I used

    blkparse -i - -f "+%T.%9t %M:%m %S %n %d %e\\n" \
                        | egrep '^\+' | sed 's/^\+//' \
                        | awk '{ \
                                if ($4 != "0" && $6 == "0") { \
                                        if ($2 in devices) { d = devices[$2] } else { d = length(devices); devices[$2] = d } \
                                        printf "%0.3f %d %d %d %s\n", $1*1000, d, $3, $4, $5 \
                                } \
                        }' \
                        | sed 's/R/1/' | sed 's/W/0/'

to parse and preprocess the trace in my project. Then add the support for your format to disksim as follows:

  1. Create a format type constant in disksim/src/disksim_global.h (there is a section with constants under /* Trace Formats */)
  2. Add a case clause in iotrace_set_format() in disksim/src/disksim_iotrace.c similarly as for the other formats
  3. Write a custom parsing function in disksim/src/disksim_iotrace.c (you can find many examples in the file)

You might need to modify the blkparse arguments from what I wrote above, since your use case is sufficiently different from mine. It sounds like you will be adding the support for this format directly to disksim, while the parser in my case was in a separate project that communicated with disksim as in syssim_driver.c.

Don't worry, it is easier than it looks! Or maybe someone else will reply with a better solution :)

Best,
-Peter


On Dec 6, 2012, at 1:17 PM, mdaghrir at cs.utsa.edu wrote:

> Hi,
> I'm an undergraduate student working on a web application project.
> 
> My project consist of creating a web application that will upload a
> tracefile made with blktrace, and display Disksim's output on a report.
> 
> My problem is that I can't find a way to convert the trace file of
> blktrace into a trace file that can be directly used by Disksim.
> 
> I already tried blkparse, but I can't find the appropriate set of
> parameters that would give me the appropriate input for Disksim.
> 
> Any help would be greatly appreciated.
> 
> Thank You
> 
> Mehdi Daghrir
> Undergraduate Student
> Departement of Computer Science
> University of Texas at San Antonio
> 
> _______________________________________________
> Disksim-users mailing list
> Disksim-users at ece.cmu.edu
> https://sos.ece.cmu.edu/mailman/listinfo/disksim-users




More information about the Disksim-users mailing list