Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Thursday, June 13, 2019
 
 

nfssnoop (8)

Name

nfssnoop - construct dtrace scripts to inspect NFS requests or responses

Synopsis

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

[-x dtrace_options] operations

Description

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.

Options

The following options are supported:

–l

List traceable NFS operations

–n

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

–e

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

Operands

The following operands are supported:

operations

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

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

Examples

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=10.135.197.59
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=10.135.197.5
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:

0

Successful completion

>0

An error occurred

Attributes

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

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/file-system/nfs

See Also

zones(7), dtrace(8)