This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

simple (dumb) script to track sizes of IOs


Hi,

Here is a simple systemtap script to track the sizes of IOs 
that are getting generated (to the driver).

Is this useful for anyone ? Earlier (before systemtap), I did 
this in the kernel to figure out the IO pattern thats getting
generated from a database run (to check the IO merging and 
optimize). Since I was doing it in the kernel, I had better
places to add counters to avoid all the error handling and 
retry cases.

BTW, feel free to enhance it to complete TODO list.

Is there a way, I can print in the order of IO sizes easily ?

Thanks,
Badari

Here is the output:

[root@elm3b23 systemtap.samples]# stap -g iosizes.stp
io sizes tracking, start time=1128617047
iosize  = 124k   iocount = 1
iosize  = 92k    iocount = 1
iosize  = 4k     iocount = 11
iosize  = 8k     iocount = 2
iosize  = 32k    iocount = 2
iosize  = 48k    iocount = 1
iosize  = 172k   iocount = 1
iosize  = 12k    iocount = 1
iosize  = 364k   iocount = 1
iosize  = 2k     iocount = 1
iosize  = 1k     iocount = 1
iosize  = 512k   iocount = 3371
iosize  = 256k   iocount = 5505
iosize  = 72k    iocount = 1
iosize  = 128k   iocount = 6830
iosize  = 44k    iocount = 1
io sizes tracking, end time=1128617074



Attachment: iosizes.stp
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]