Below is a proposal for a new DTrace provider for NFS v3 developed by Sam Falkner, Lisa Week, and me. It''s quite similar to the NFS v4 provider which was integrated into Solaris last month. If you have any comments, please voice them by January 24th as we hope to submit the PSARC case shortly after that. Adam ---8<--- NFS v3 Provider All NFS operation probes have the first argument in common: args[0] conninfo_t * socket connection information The conninfo_t structure is already used by the iSCSI target provider (iscsi) and the NFS v4 provider (nfsv4), and is intended for use by all providers related to a higher level protocol (e.g. iscsi, nfs, http, ftp). typedef struct conninfo { string ci_local; /* local host address */ string ci_remote; /* remote host address */ string ci_protocol; /* protocol (ipv4, ipv6, etc) */ } conninfo_t; Operation probes have their second argument in common: args[1] nfsv3opinfo_t * NFS v3 operation properties typedef struct nfsv3opinfo { string noi_curpath; /* current file handle path (if any) */ cred_t *noi_cred; /* credentials */ uint64_t noi_xid; /* transaction ID */ } nfsv4opinfo_t; Below is a list of the probes along with the specific argument for each whose type is defined by the NFS v3 specification: probe name args[2] ---------- ------- nfsv3:::op-access-start ACCESS3args * nfsv3:::op-access-done ACCESS3res * nfsv3:::op-commit-start COMMIT3args * nfsv3:::op-commit-done COMMIT3res * nfsv3:::op-create-start CREATE3args * nfsv3:::op-create-done CREATE3res * nfsv3:::op-fsinfo-start FSINFO3args * nfsv3:::op-fsinfo-done FSINFO3res * nfsv3:::op-fsstat-start FSSTAT3args * nfsv3:::op-fsstat-done FSSTAT3res * nfsv3:::op-getattr-start GETATTR3args * nfsv3:::op-getattr-done GETATTR3res * nfsv3:::op-lookup-start LOOKUP3args * nfsv3:::op-lookup-done LOOKUP3res * nfsv3:::op-link-start LINK3args * nfsv3:::op-link-done LINK3res * nfsv3:::op-mkdir-start MKDIR3args * nfsv3:::op-mkdir-done MKDIR3res * nfsv3:::op-mknod-start MKNOD3args * nfsv3:::op-mknod-done MKNOD3res * nfsv3:::op-null-start - nfsv3:::op-null-done - nfsv3:::op-pathconf-start PATHCONF3args * nfsv3:::op-pathconf-done PATHCONF3res * nfsv3:::op-read-start READ3args * nfsv3:::op-read-done READ3res * nfsv3:::op-readdir-start READDIR3args * nfsv3:::op-readdir-done READDIR3res * nfsv3:::op-readdirplus-start READDIRPLUS3args * nfsv3:::op-readdirplus-done READDIRPLUS3res * nfsv3:::op-readlink-start READLINK3args * nfsv3:::op-readlink-done READLINK3res * nfsv3:::op-remove-start REMOVE3args * nfsv3:::op-remove-done REMOVE3res * nfsv3:::op-renamestart RENAME3args * nfsv3:::op-rename-done RENAME3res * nfsv3:::op-rmdir-start RMDIR3args * nfsv3:::op-rmdir-done RMDIR3res * nfsv3:::op-setattr-start SETATTR3args * nfsv3:::op-setattr-done SETATTR3res * nfsv3:::op-symlink-start SYMLINK3args * nfsv3:::op-symlink-done SYMLINK3res * nfsv3:::op-write-start WRITE3args * nfsv3:::op-write-done WRITE3res * Note that op-null-* probes have an undefined args[2]. Documentation and examples can be found here: http://wikis.sun.com/display/DTrace/nfsv3+Provider ---8<--- -- Adam Leventhal, Fishworks http://blogs.sun.com/ahl
I forgot to include a big thank you to Brendan Gregg for writing a bunch of example scripts for the NFS v3 provider. Be sure to check out the documentation on the DTrace wiki. http://wikis.sun.com/display/DTrace/nfsv3+Provider Adam On Thu, Jan 17, 2008 at 02:24:20PM -0800, Adam Leventhal wrote:> Below is a proposal for a new DTrace provider for NFS v3 developed by Sam > Falkner, Lisa Week, and me. It''s quite similar to the NFS v4 provider which > was integrated into Solaris last month. If you have any comments, please > voice them by January 24th as we hope to submit the PSARC case shortly > after that. > > Adam > > ---8<--- > > NFS v3 Provider > > All NFS operation probes have the first argument in common: > > args[0] conninfo_t * socket connection information > > The conninfo_t structure is already used by the iSCSI target provider (iscsi) > and the NFS v4 provider (nfsv4), and is intended for use by all providers > related to a higher level protocol (e.g. iscsi, nfs, http, ftp). > > typedef struct conninfo { > string ci_local; /* local host address */ > string ci_remote; /* remote host address */ > string ci_protocol; /* protocol (ipv4, ipv6, etc) */ > } conninfo_t; > > > Operation probes have their second argument in common: > > args[1] nfsv3opinfo_t * NFS v3 operation properties > > typedef struct nfsv3opinfo { > string noi_curpath; /* current file handle path (if any) */ > cred_t *noi_cred; /* credentials */ > uint64_t noi_xid; /* transaction ID */ > } nfsv4opinfo_t; > > Below is a list of the probes along with the specific argument for each > whose type is defined by the NFS v3 specification: > > probe name args[2] > ---------- ------- > nfsv3:::op-access-start ACCESS3args * > nfsv3:::op-access-done ACCESS3res * > nfsv3:::op-commit-start COMMIT3args * > nfsv3:::op-commit-done COMMIT3res * > nfsv3:::op-create-start CREATE3args * > nfsv3:::op-create-done CREATE3res * > nfsv3:::op-fsinfo-start FSINFO3args * > nfsv3:::op-fsinfo-done FSINFO3res * > nfsv3:::op-fsstat-start FSSTAT3args * > nfsv3:::op-fsstat-done FSSTAT3res * > nfsv3:::op-getattr-start GETATTR3args * > nfsv3:::op-getattr-done GETATTR3res * > nfsv3:::op-lookup-start LOOKUP3args * > nfsv3:::op-lookup-done LOOKUP3res * > nfsv3:::op-link-start LINK3args * > nfsv3:::op-link-done LINK3res * > nfsv3:::op-mkdir-start MKDIR3args * > nfsv3:::op-mkdir-done MKDIR3res * > nfsv3:::op-mknod-start MKNOD3args * > nfsv3:::op-mknod-done MKNOD3res * > nfsv3:::op-null-start - > nfsv3:::op-null-done - > nfsv3:::op-pathconf-start PATHCONF3args * > nfsv3:::op-pathconf-done PATHCONF3res * > nfsv3:::op-read-start READ3args * > nfsv3:::op-read-done READ3res * > nfsv3:::op-readdir-start READDIR3args * > nfsv3:::op-readdir-done READDIR3res * > nfsv3:::op-readdirplus-start READDIRPLUS3args * > nfsv3:::op-readdirplus-done READDIRPLUS3res * > nfsv3:::op-readlink-start READLINK3args * > nfsv3:::op-readlink-done READLINK3res * > nfsv3:::op-remove-start REMOVE3args * > nfsv3:::op-remove-done REMOVE3res * > nfsv3:::op-renamestart RENAME3args * > nfsv3:::op-rename-done RENAME3res * > nfsv3:::op-rmdir-start RMDIR3args * > nfsv3:::op-rmdir-done RMDIR3res * > nfsv3:::op-setattr-start SETATTR3args * > nfsv3:::op-setattr-done SETATTR3res * > nfsv3:::op-symlink-start SYMLINK3args * > nfsv3:::op-symlink-done SYMLINK3res * > nfsv3:::op-write-start WRITE3args * > nfsv3:::op-write-done WRITE3res * > > Note that op-null-* probes have an undefined args[2]. > > > Documentation and examples can be found here: > > http://wikis.sun.com/display/DTrace/nfsv3+Provider > > ---8<--- > > -- > Adam Leventhal, Fishworks http://blogs.sun.com/ahl > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Fishworks http://blogs.sun.com/ahl
eric kustarz
2008-Jan-18 00:17 UTC
[dtrace-discuss] [nfs-discuss] provider proposal: NFS v3
On Jan 17, 2008, at 2:24 PM, Adam Leventhal wrote:> Below is a proposal for a new DTrace provider for NFS v3 developed > by Sam > Falkner, Lisa Week, and me. It''s quite similar to the NFS v4 > provider which > was integrated into Solaris last month. If you have any comments, > please > voice them by January 24th as we hope to submit the PSARC case shortly > after that.This is for just the NFSv3 server (as opposed to the client and server), right? Any plans for the ancillary protocols of NFSv3 (NLM, MOUNT, stat, acl)? This would allow us to have a true "nfsv3_snoop.d". eric> > Adam > > ---8<--- > > NFS v3 Provider > > All NFS operation probes have the first argument in common: > > args[0] conninfo_t * socket connection information > > The conninfo_t structure is already used by the iSCSI target > provider (iscsi) > and the NFS v4 provider (nfsv4), and is intended for use by all > providers > related to a higher level protocol (e.g. iscsi, nfs, http, ftp). > > typedef struct conninfo { > string ci_local; /* local host address */ > string ci_remote; /* remote host address */ > string ci_protocol; /* protocol (ipv4, ipv6, etc) */ > } conninfo_t; > > > Operation probes have their second argument in common: > > args[1] nfsv3opinfo_t * NFS v3 operation properties > > typedef struct nfsv3opinfo { > string noi_curpath; /* current file handle path (if any) */ > cred_t *noi_cred; /* credentials */ > uint64_t noi_xid; /* transaction ID */ > } nfsv4opinfo_t; > > Below is a list of the probes along with the specific argument for > each > whose type is defined by the NFS v3 specification: > > probe name args[2] > ---------- ------- > nfsv3:::op-access-start ACCESS3args * > nfsv3:::op-access-done ACCESS3res * > nfsv3:::op-commit-start COMMIT3args * > nfsv3:::op-commit-done COMMIT3res * > nfsv3:::op-create-start CREATE3args * > nfsv3:::op-create-done CREATE3res * > nfsv3:::op-fsinfo-start FSINFO3args * > nfsv3:::op-fsinfo-done FSINFO3res * > nfsv3:::op-fsstat-start FSSTAT3args * > nfsv3:::op-fsstat-done FSSTAT3res * > nfsv3:::op-getattr-start GETATTR3args * > nfsv3:::op-getattr-done GETATTR3res * > nfsv3:::op-lookup-start LOOKUP3args * > nfsv3:::op-lookup-done LOOKUP3res * > nfsv3:::op-link-start LINK3args * > nfsv3:::op-link-done LINK3res * > nfsv3:::op-mkdir-start MKDIR3args * > nfsv3:::op-mkdir-done MKDIR3res * > nfsv3:::op-mknod-start MKNOD3args * > nfsv3:::op-mknod-done MKNOD3res * > nfsv3:::op-null-start - > nfsv3:::op-null-done - > nfsv3:::op-pathconf-start PATHCONF3args * > nfsv3:::op-pathconf-done PATHCONF3res * > nfsv3:::op-read-start READ3args * > nfsv3:::op-read-done READ3res * > nfsv3:::op-readdir-start READDIR3args * > nfsv3:::op-readdir-done READDIR3res * > nfsv3:::op-readdirplus-start READDIRPLUS3args * > nfsv3:::op-readdirplus-done READDIRPLUS3res * > nfsv3:::op-readlink-start READLINK3args * > nfsv3:::op-readlink-done READLINK3res * > nfsv3:::op-remove-start REMOVE3args * > nfsv3:::op-remove-done REMOVE3res * > nfsv3:::op-renamestart RENAME3args * > nfsv3:::op-rename-done RENAME3res * > nfsv3:::op-rmdir-start RMDIR3args * > nfsv3:::op-rmdir-done RMDIR3res * > nfsv3:::op-setattr-start SETATTR3args * > nfsv3:::op-setattr-done SETATTR3res * > nfsv3:::op-symlink-start SYMLINK3args * > nfsv3:::op-symlink-done SYMLINK3res * > nfsv3:::op-write-start WRITE3args * > nfsv3:::op-write-done WRITE3res * > > Note that op-null-* probes have an undefined args[2]. > > > Documentation and examples can be found here: > > http://wikis.sun.com/display/DTrace/nfsv3+Provider > > ---8<--- > > -- > Adam Leventhal, Fishworks http:// > blogs.sun.com/ahl > _______________________________________________ > nfs-discuss mailing list > nfs-discuss at opensolaris.org
Adam Leventhal
2008-Jan-18 00:28 UTC
[dtrace-discuss] [nfs-discuss] provider proposal: NFS v3
On Thu, Jan 17, 2008 at 04:17:25PM -0800, eric kustarz wrote:> This is for just the NFSv3 server (as opposed to the client and > server), right?Just the server. We have designs for client providers, but we (obviously) don''t need them for Fishworks.> Any plans for the ancillary protocols of NFSv3 (NLM, MOUNT, stat, > acl)? This would allow us to have a true "nfsv3_snoop.d".No immediate plans. What would be needed? Adam -- Adam Leventhal, Fishworks http://blogs.sun.com/ahl
eric kustarz
2008-Jan-18 19:06 UTC
[dtrace-discuss] [nfs-discuss] provider proposal: NFS v3
On Jan 17, 2008, at 4:28 PM, Adam Leventhal wrote:> On Thu, Jan 17, 2008 at 04:17:25PM -0800, eric kustarz wrote: >> This is for just the NFSv3 server (as opposed to the client and >> server), right? > > Just the server. We have designs for client providers, but we > (obviously) > don''t need them for Fishworks. > >> Any plans for the ancillary protocols of NFSv3 (NLM, MOUNT, stat, >> acl)? This would allow us to have a true "nfsv3_snoop.d". > > No immediate plans. What would be needed?Same thing you did for NFSv4 and are doing for NFSv3 - mostly putting in some stable probes (like the DTRACE_NFSV4_2() calls in rfs4_op_*). The ACL server side code is at: http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/ common/fs/nfs/nfs_acl_srv.c The NLM code is under usr/closed. I''d have to dig for the stat and MOUNT stuff, but that might be trickier as i believe its in userland. Should be able to just check for callers of clnt_call(). The obvious big win is the provider for the NFSv3 protocol itself that you are doing. May want to garner interest from the community to see if anyone really cares about the other protocols. Nice to note that NFSv4 cleaned this up by only having one protocol. eric
Adam Leventhal
2008-Jan-18 19:17 UTC
[dtrace-discuss] [nfs-discuss] provider proposal: NFS v3
On Fri, Jan 18, 2008 at 11:06:33AM -0800, eric kustarz wrote:> >>Any plans for the ancillary protocols of NFSv3 (NLM, MOUNT, stat, > >>acl)? This would allow us to have a true "nfsv3_snoop.d". > > > >No immediate plans. What would be needed? > > Same thing you did for NFSv4 and are doing for NFSv3 - mostly putting > in some stable probes (like the DTRACE_NFSV4_2() calls in rfs4_op_*). > > The ACL server side code is at: > http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/ > common/fs/nfs/nfs_acl_srv.cThis all looks pretty reasonable. We''ll do this as a follow-on to the nfsv3 provider (either adding more probes to the provider or adding another provider). Adam -- Adam Leventhal, Fishworks http://blogs.sun.com/ahl