Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Wednesday, July 27, 2022

nfssnoop (8)


nfssnoop - construct dtrace scripts to inspect NFS requests or responses


nfsnoop [-ln] [-o output_file] [-s script_file\

[-x dtrace_options] operations


The nfssnoop command is a debugging tool based on a collection of dtrace command scripts.

The nfssnoop command displays each request or response pair in multi-line forms and output. For more information on debugging, see the dtrace(8) man page.


The following options are supported:


List traceable NFS operations


Constructs the dtrace file and does not run it

–o output_file

Redirects output to file specified by output_file

–s script_file

Saves constructed script to file specified by script_file

–x dtrace_options

Adds additional dtrace command line options. Each occurrence can add one option

–d detail_type

Adds extra detail of the type named. The only detail_type currently implemented is "rdma", which adds tracing of lower-level RDMA messages associated with the NFS protocol operations traced


Adds tracing for errors which occur outside the processing of individual NFS operations


The following operands are supported:


The user gets a list of supported operations with nfssnoop –l to choose from.

For example, nfssnoop open close delete traces basic delegation information.


Example 1 Tracing NFSv4 Open and Close Operations:

The following example traces the NFSv4 open and close operations.

example# /usr/lib/nfs/nfssnoop open close
12:25:32.178 116498899  OPEN_START proto=rdma remoteIP=
12:25:32.178 116498899  OPEN_START_CONT seqid=8 share_access=1 share
12:25:32.178 116498899  OPEN_START_CONT attrmask=0.0 attrlist_len=0 
12:25:32.178 116498899  OPEN_START_CONT file=libc.so
12:25:32.178 116498899  OPEN_DONE status#=10011 status=EXPIRED
12:25:32.178 116498899  OPEN_DONE_CONT why=not-wanted server_will_pu
12:25:32.192 200384979  CLOSE_START proto=rdma remoteIP=
12:25:32.192 200384979  CLOSE_START_CONT stateid.seqid=0x2 stateid.o
12:25:32.192 200384979  CLOSE_DONE status#=0 status=OK
12:25:32.192 200384979  CLOSE_DONE_CONT stateid.seqid=0x3 stateid.ot
Example 2 Constructing a Script to Trace Read and Write Operations

The following example constructs a script to trace read and write operations.

example# /usr/lib/nfs/nfssnoop -n -s /path/generated_script.d read write

Exit Status

The following exit values are returned:


Successful completion


An error occurred


See attributes(7) for descriptions of the following attributes:


See Also

zones(7), dtrace(8)