nfsv4ops.d problem on Solaris 11

From: Richard Skelton <Richard.Skelton_at_infineon.com>
Date: Mon May 13 2013 - 06:21:38 EDT
Hi,
I found  a nice set of dtrace scripts for NFS monitoring :-
# ls nfs*
nfsv3fileio.d   nfsv3ops.d      nfsv3rwsnoop.d  nfsv3rwtime.d   
nfsv4fileio.d   nfsv4ops.d      nfsv4rwsnoop.d  nfsv4rwtime.d

I have no problems with the nfs?rwsnoop.d and nfs?rwtime.d
but nfsv4ops.d doe not give the "Client" information:-
# ./nfsv4ops.d
Tracing... Interval 5 secs.

    Client                           Operation                       Count
                                     op-close-done                       1
                                     op-close-start                      1
                                     op-commit-done                      1
                                     op-commit-start                     1
                                     op-delegreturn-done                 1
                                     op-delegreturn-start                1
                                     op-open-done                        1
                                     op-open-start                       1
                                     op-rename-done                      1
                                     op-rename-start                     1
                                     op-nverify-done                     2
                                     op-nverify-start                    2
                                     op-restorefh-done                   3
                                     op-restorefh-start                  3
                                     op-write-done                       3
                                     op-write-start                      3
                                     op-lookup-done                      4
                                     op-lookup-start                     4
                                     op-savefh-done                      6
                                     op-savefh-start                     6
                                     op-lookupp-done                   438
                                     op-lookupp-start                  438
                                     op-access-done                    441
                                     op-access-start                   441
                                     op-getfh-done                     441
                                     op-getfh-start                    441
                                     op-readdir-done                   834
                                     op-readdir-start                  834
                                     op-remove-start                   839
                                     op-remove-done                    840
                                     op-getattr-done                  2168
                                     op-getattr-start                 2168
                                     op-putfh-done                    2570
                                     op-putfh-start                   2570

    Client                           Operation                       Count
                                     op-renew-done                       1
                                     op-renew-start                      1

On NFS V3 version  you get ;-
    Client                           Operation                       Count
    192.168.0.110                   op-access-start                     1
    192.168.0.110                   op-commit-start                     1
    192.168.0.110                   op-create-start                     1
    192.168.0.110                   op-getattr-start                    1
    192.168.0.110                   op-lookup-start                     1
    192.168.0.110                   op-setattr-start                    1
    192.168.0.110                   op-write-start                      1
    192.168.0.111                   op-commit-start                     1
    192.168.0.111                   op-write-start                      1


# cat nfsv4ops.d
#!/usr/sbin/dtrace -s

#pragma D option quiet

dtrace:::BEGIN
{
         trace("Tracing... Interval 5 secs.\n");
}

nfsv4:nfssrv::op-*
{
         cninf = (struct conninfo *) arg0;
         @ops[cninf->ci_remote, probename] = count();
}

profile:::tick-5sec,
dtrace:::END
{
         printf("\n   %-32s %-28s %8s\n", "Client", "Operation", "Count");
         printa("   %-32s %-28s %@8d\n", @ops);
         trunc(@ops);
}
# cat nfsv3ops.d
#!/usr/sbin/dtrace -s

#pragma D option quiet

dtrace:::BEGIN
{
         trace("Tracing NFSv3 operations... Interval 5 secs.\n");
}

nfsv3:::op-*-start
{
         @ops[args[0]->ci_remote, probename] = count();
}

profile:::tick-5sec,
dtrace:::END
{
         printf("\n   %-32s %-28s %8s\n", "Client", "Operation", "Count");
         printa("   %-32s %-28s %@8d\n", @ops);
         trunc(@ops);
}
#


-- 



Cheers

Richard Skelton
Richard.Skelton@infineon.com
Infineon Technologies UK Ltd
Infineon House
Great Western Court
Hunts Ground Road
Stoke Gifford
Bristol
BS34 8HP
Tel +44(0)117 952 8808
Fax: +44(0)117 952 8777
Mobile: +44(0)743 6272 137
Received on Mon May 13 06:22:46 2013

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 09:24:59 EDT