Hey all,
I'm trying to debug some nfs client/server issues and have made a dtrace script that outputs nfs3_bio actions (ie, when the page isn't already cached and a IO has to go back to the NFS server) and by and large that part is working. What I'm trying to do is make the distinction between a IO that is the result of a NFS read-ahead and one that isn't and reflect that in the output.
I'm probably not groking how the stack works when seeing if fbt::nfs3_readahead:entry is involved in the IO's birth prior to nfs3_bio being triggered... any suggestions on how to get this? the script below only occasionally shows a 1 if nfs3_readahead was involved.
#!/usr/sbin/dtrace -s #pragma D option quiet io::nfs3_bio:start { self->trace = 1; self->now = timestamp; self->bi = *args[0]; self->fi = *args[2]; self->readahead = 0; } fbt::nfs3_readahead:entry /self->trace/ { self->readahead = 1; } io::nfs3_bio:done /self->trace/ { printf("%Y\t%d\t%s\t%d\t%d\tREADAHEAD=%d\n", walltimestamp, (timestamp - self->now) / 1000, self->fi.fi_pathname, self->fi.fi_offset, self->bi.b_bcount, self->readahead ); stack(); } _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org