Leon Koll wrote: > Still nothing: > # snoop rpc nfs | grep READDIR > 12.0.0.158 -> 12.0.0.156 NFS C READDIRPLUS3 FH=038D Cookie=0 for > 8192/8192 > 12.0.0.158 -> 12.0.0.156 NFS C READDIRPLUS3 FH=F1B9 Cookie=0 for > 8192/8192 > 12.0.0.158 -> 12.0.0.156 NFS C READDIRPLUS3 FH=9736 Cookie=0 for > 8192/8192 > 12.0.0.158 -> 12.0.0.156 NFS C READDIR3 FH=1C2A Cookie=0 for 8192 > 12.0.0.158 -> 12.0.0.156 NFS C READDIRPLUS3 FH=1144 Cookie=0 for > 8192/8192 > 12.0.0.158 -> 12.0.0.156 NFS C READDIRPLUS3 FH=A4A7 Cookie=0 for > 8192/8192 > ^C > # ./matty.d > dtrace: script './matty.d' matched 1 probe > ^C > > # ./matty.d > dtrace: script './matty.d' matched 1 probe > ^C > > # cat matty.d > #!/usr/sbin/dtrace -s > > fbt:nfs:nfs3_readdir:entry > { > @count[execname,probefunc] = count(); > } > and you are running this on the NFS client? If you are running on the NFS server, then that would be:
dtrace -n ::rfs3_readdir:entry,::rfs3_readdirplus:entry'{...@count[execname,probefunc] = count();}' Mahesh > Thanks, > -- Leon > > > On 2/25/07, Matty <matty91 at gmail.com> wrote: >> What do you get with the following (leave it running until you see a >> few READDIR operations with snoop, and then hit ^C)?: >> >> fbt:nfs:nfs3_readdir:entry >> { >> @count[execname,probefunc] = count(); >> } >> >> On 2/25/07, Leon Koll <leon.is.here at gmail.com> wrote: >> > I removed the "execname== nfsd" line and got nothing again: >> > >> > # ./readdir.d >> > dtrace: script './readdir.d' matched 21739 probes >> > ^C >> > CPU ID FUNCTION:NAME >> > 0 2 :END >> > ==============time===================== >> > ==============count==================== >> > ========total time in func============= >> > ======average time in func============= >> > >> > >> > # more readdir.d >> > #!/usr/sbin/dtrace -s >> > >> > #pragma D option dynvarsize=64m >> > >> > fbt::nfs3readdirplus:entry, >> > fbt::nfs3readdir:entry >> > { >> > @count[probefunc] = count(); >> > self->x[probefunc, stackdepth] = timestamp >> > } >> > fbt:::return >> > / self->x[probefunc, stackdepth] / >> > { >> > this->diff = timestamp - self->x[probefunc, stackdepth]; >> > @time[probefunc] = quantize(this->diff); >> > @total[probefunc] = sum(this->diff); >> > @avg[probefunc] = avg(this->diff); >> > self->x[probefunc, stackdepth] = 0 >> > } >> > END { >> > printf("==============time====================="); >> > printa(@time); >> > printf("==============count===================="); >> > printa(@count); >> > printf("========total time in func============="); >> > printa(@total); >> > printf("======average time in func============="); >> > printa(@avg); >> > } >> > >> > Thanks, >> > -- Leon >> > >> > On 2/25/07, Matty <matty91 at gmail.com> wrote: >> > > I think execname is set to the name of the executable that performs >> > > the readdir*(), not nfsd. What happens when you remove the "execname >> > > == nfsd" line from the entry probes?: >> > > >> > > fbt::nfs3readdirplus:entry, >> > > fbt::nfs3readdir:entry >> > > { >> > > @count[execname,probefunc] = count(); >> > > self->x[probefunc, stackdepth] = timestamp >> > > } >> > > >> > > Thanks, >> > > - Ryan >> > > -- >> > > UNIX Administrator >> > > http://prefetch.net >> > > >> > > On 2/25/07, Leon Koll <leon.is.here at gmail.com> wrote: >> > > > On 2/21/07, Calum Mackay <Calum.Mackay at sun.com> wrote: >> > > > > hi Leon, >> > > > > >> > > > > That does indeed look odd. The kstat is incremented *before* >> we send the >> > > > > request, so it's hard to see how you can see it in a snoop, >> and not in >> > > > > the nfsstat output. >> > > > > >> > > > > What version of Solaris is the client running? >> > > > > >> > > > > A dtrace script would indeed do it, too, of course. An FBT >> trace on e.g. >> > > > > >> > > > > fbt::nfs3readdirplus:entry >> > > > > >> > > > > fbt::nfs3readdir:entry >> > > > > >> > > > > will catch the two types of READDIR. >> > > > >> > > > Hi Calum, >> > > > I used this one (please correct if something is wrong in it) : >> > > > >> > > > #!/usr/sbin/dtrace -s >> > > > #pragma D option dynvarsize=64m >> > > > >> > > > fbt::nfs3readdirplus:entry, >> > > > fbt::nfs3readdir:entry >> > > > / execname == "nfsd" / >> > > > { >> > > > @count[probefunc] = count(); >> > > > self->x[probefunc, stackdepth] = timestamp >> > > > } >> > > > fbt:::return >> > > > / self->x[probefunc, stackdepth] / >> > > > { >> > > > this->diff = timestamp - self->x[probefunc, stackdepth]; >> > > > @time[probefunc] = quantize(this->diff); >> > > > @total[probefunc] = sum(this->diff); >> > > > @avg[probefunc] = avg(this->diff); >> > > > self->x[probefunc, stackdepth] = 0 >> > > > } >> > > > END { >> > > > printf("==============time====================="); >> > > > printa(@time); >> > > > printf("==============count===================="); >> > > > printa(@count); >> > > > printf("========total time in func============="); >> > > > printa(@total); >> > > > printf("======average time in func============="); >> > > > printa(@avg); >> > > > } >> > > > >> > > > and got nothing: >> > > > # ./readdir.d >> > > > dtrace: script './readdir.d' matched 22067 probes >> > > > ^C >> > > > CPU ID FUNCTION:NAME >> > > > 1 2 :END >> > > > ==============time===================== >> > > > ==============count==================== >> > > > ========total time in func============= >> > > > ======average time in func============= >> > > > >> > > > At the same time, snoop shows a lot of ACCESS3, GETATTR3, >> READDIRPLUS3 ops. >> > > > Where's the catch? >> > > > >> > > > Thanks, >> > > > -- Leon >> > > > _______________________________________________ >> > > > nfs-discuss mailing list >> > > > nfs-discuss at opensolaris.org >> > > > >> > > _______________________________________________ >> > > nfs-discuss mailing list >> > > nfs-discuss at opensolaris.org >> > > >> > >> >> >> -- >> UNIX Administrator >> http://prefetch.net >> _______________________________________________ >> nfs-discuss mailing list >> nfs-discuss at opensolaris.org >> > _______________________________________________ > nfs-discuss mailing list > nfs-discuss at opensolaris.org