logo
Published on KernelTrap (http://kerneltrap.org)

how to blktrace on my system

By
Created Dec 10 2007 - 05:59

Helo everybody.

Recently I've started to research about blktrace and blkparse to monitoring a server.
To start with my work I have developed a very simple program that creates a file on my home directory (/home/user), and in this file write a number of bytes given like parameter.

At the same time, in other console I use blktrace with blkparse to monitoring the HD.

But when my program finish its work and I try to view the results of blkparse, don't appear any data of my program (I have searched by pid and name).

By modifying the files /proc/sys/vm/dirty_writeback_centisecs, /proc/sys/vm/dirty_background_ratio, only appear some of petitions made by my program.

I have tryed in all hda (hda1, hda2 and hda3) but I don't get results.

I'm using blktrace -d /dev/hda1 -o - | blkparse -i - > file.txt
But I have tryed also, with blktrace -d /dev/hda2 -o - | blkparse -i - > file.txt, and blktrace -d /dev/hda3 -o - | blkparse -i - > file.txt. And results are very similar.

My partition table is like this.
/dev/hda1 --> swap
/dev/hda2 --> /
/dev/hda3 --> /home

Somebody know how to trace hd activity and log it?


Source URL:
http://kerneltrap.org/node/14941