Look at the io provider. It shows you when physical IOs
are issued. /usr/demo/dtrace/ionsoop.d provides a very
basic example fo how to use this.

I tend to prefer this version for the very basic  information:

#! /usr/sbin/dtrace -Fs
io:::start
{
        @a[execname, pid, args[2]->fi_pathname != "<none>" ? 
args[2]->fi_pathname : args[1]->dev_pathname, args[0]->b_bcount] = count();
}

With a command such as:

dd if=/dev/dsk/c0d0s2 ibs=1048576 of=/dev/null obs=1048576

You'll see among other things (eliminating spaces for clarity):

dd   1591  /devices/p...@0,0/pci-...@1f,2/i...@0/c...@0,0:c                
57344            26351

26351 read of 67344 bytes. Hmm. maxphys is 1MB on this system, I'll need 
to look
further.

You can gather elapsed times, track which are readcs vs writes and lots of
other things. The key is the io provider to see the "physical" IOs 
performed.

Jim Litchfield
===========


qihua wu wrote:
> Hi, All,
>
> Do we have entry point to tell us whether the IO performed bypass FS 
> cache or not?
> Somebody said using dd to copy file using raw disk format such as dd 
> if=/dev/dsk/...  will bypass the FS cache but using dd to copy a 
> normal file will NOT bypass the FS cache, I'd like to verify this. I 
> am wondering whether Dtrace could help on this case.
>
> Thanks,
> Daniel,
> ------------------------------------------------------------------------
>
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss@opensolaris.org
>   

_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to