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
>

Reply via email to