The Linux kernel can collect events about all state changes of I/O requests. Later, the blktrace utilities can derive data from these events.
git://git.kernel.dk/blktrace.git
or
http://brick.kernel.dk/snaps/
The
blktrace README file tells you where to get the sources, how to use
blktrace and where to find the documentation.You can collect data about I/O requests with the help of blktrace (see Figure 1).