1

Can blktrace only trace one specific process? Right now blktrace dump out all io activity out, which takes a lot of time using blkparse to parse it. But we are only interested in one particular process. Is there any way to configure blktrace to track only that process?

Thanks, Jeff

Zaid Malhis
  • 588
  • 4
  • 18
bilbao
  • 13
  • 4

2 Answers2

0

No, blktrace works on a device as it is an i/o performance tool, not a process. I guess you would have to configure a process to use a particular block device but no other processes, if that is possible for you, to do something like that.

johnshen64
  • 3,734
  • 1
  • 21
  • 17
  • Thanks, but I am already doing this. There are a lot of system event messages (e.g. cfq) that makes parsing a 44M blktrace dump file 12min. Is it normal? Is there a way to optimize it? Thanks! – bilbao May 21 '12 at 19:18
  • I am using "blktrace -d /dev/sda -o - | blkparse -i -". When I kill the blktrace, then blkparse takes long time(12min for parsing 44M) to complete... – bilbao May 21 '12 at 19:21
  • -a filter masks is only way i know of that will limit the event types traced, and you can play with that to see if you can get the right ones you want but not the other ones. have not really played with these myself. man page has detailed explanations of the filter masks. – johnshen64 May 21 '12 at 19:46
0

Use the "-o" option of blkparse to avoid the output of data to stdout. This reduces the time that is needed for blkparse. I'm able to parse 72MB in 30 seconds.

smoors
  • 201
  • 2
  • 6