[dtrace-discuss] File name not being displayed.

Pramod Batni
2009-08-16T19:21:23Z

vhiz wrote:
> I found the script below in the dtrace manual:
>
> #pragma D option quiet
> BEGIN
> {
>     printf("%10s %58s %2s %7s\n", "DEVICE",
"FILE", "RW", "MS");
> }
> io:::start
> {
>     start[args[0]->b_edev, args[0]->b_blkno] = timestamp;
> }
> io:::done
> /start[args[0]->b_edev, args[0]->b_blkno]/
> {
>     this->elapsed = timestamp - start[args[0]->b_edev,
args[0]->b_blkno];
>     printf("%10s %58s %2s %3d.%03d\n", args[1]->dev_statname,
>         args[2]->fi_pathname, args[0]->b_flags & B_READ ?
"R" : "W",
>         this->elapsed / 10000000, (this->elapsed / 1000) % 1000);
>     start[args[0]->b_edev, args[0]->b_blkno] = 0;
> }
>
>
> It does not display the file name even if I am accessing a user created
file. Any ideas?
>
  What filesystem is being used?
  If it is ufs, most likely the file is cached [i,e it is already loaded
in memory] and hence no disk IO occurs to retrieve the
  file from the disk.
  If possible ''unmount'' the filesystem and mount it back and
then access
the file after running the script above, you should
  see the filename displayed.

Pramod
> Thank you.
>