On Fri, 1 Aug 2008, jianhua wang wrote:

> we can trace Vnode interface, but can we fetching file system information, 
> demonstrate df?

df is a per-filesystem operation - VFS_STATVFS().
As a start, try this DTrace piece:

fbt::fsop_statfs:entry { self->t = arg1 }
fbt::fsop_statfs:return /self->t/
{
        arg0 ? printf("statvfs error") : trace((struct statvfs *)(self->t);
        self->t = 0;
}

You might need a bit better than 'trace()' - I'm too lazy to write a 
prettyprinter now :)

FrankH.
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to