NFSTEST_FILE(1)

NAME
nfstest_file - Find all packets for a specific file

SYNOPSIS
nfstest_file [options] -p <filepath> <trace1.cap> [<trace2.cap> ...]

DESCRIPTION
Display all NFS packets for the specified path. It takes a relative path, where it searches for each of the directory entries given in the path until it gets the file handle for the directory where the file is located. Once the directory file handle is found, a LOOKUP or OPEN/CREATE is searched for the given file name. If the file lookup or creation is found, all file handles and state ids associated with that file are searched and all packets found, including their respective replies are displayed. There are three levels of verbosity in which they are specified using a bitmap, where the most significant bit gives a more verbose output. Verbose level 1 is used as a default where each packet is displayed condensed to one line using the last layer of the packet as the main output. The packet trace files are processed either serially or in parallel. The packets are displayed using their timestamps so they are always displayed in the correct order even if the files given are out of order. If the packet traces were captured one after the other the packets are displayed serially, first the packets of the first file according to their timestamps, then the second and so forth. If the packet traces were captured at the same time on multiple clients the packets are displayed in parallel, packets are interleaved from all the files when displayed again according to their timestamps. Note: A packet call can be displayed out of order if the call is not matched by any of the file handles, state ids or names but its reply is matched so its corresponding call is displayed right before the reply.

OPTIONS

--version
    show program's version number and exit

-h, --help
    show this help message and exit

-p PATH, --path=PATH
    Path relative to the mount point, the path can be specified by its file handle 'FH:0xc3f001b4'. Also the relative path could start with a directory file handle 'DH:0x0c35bb58/file_name'

--stid=STID
    State id to include in the search

-v VERBOSE, --verbose=VERBOSE
    Verbose level bitmask [default: 1]. bitmap 0x01: one line per packet. bitmap 0x02: one line per layer. bitmap 0x04: real verbose.

-s START, --start=START
    Start index [default: 0]

-e END, --end=END
    End index [default: 0]

-z TZ, --tz=TZ
    Time zone to use to display timestamps

--progress=PROGRESS
    Display progress bar [default: 1]

  Packet display:

--frame=FRAME
    Display record frame number [default: 0]

--index=INDEX
    Display packet number [default: 1]

--crc16=CRC16
    Display CRC16 encoded strings [default: True]

--crc32=CRC32
    Display CRC32 encoded strings [default: True]

--strsize=STRSIZE
    Truncate all strings to this size [default: 0]

  Debug:

--enum-check=ENUM_CHECK
    If set to True, enums are strictly enforced [default: False]

--debug-level=DEBUG_LEVEL
    Set debug level messages

EXAMPLES
# Find all packets for relative path: nfstest_file -p data/name_d_1/name_d_2/name_f_13 nested_dir_v3.cap
# Find all packets for relative path, starting with a directory file handle: nfstest_file -p DH:0x34ac5f28/name_d_1/name_d_2/name_f_13 nested_dir_v3.cap
# Find all packets for file, starting with a directory file handle: nfstest_file -p DH:0x0c35bb58/name_f_13 nested_dir_v3.cap
# Find all packets for file handle nfstest_file -p FH:0xc3f001b4 /tmp/trace.cap
# Find all packets for file, including all operations for the given state id nfstest_file -p f00000001 --stid 0x0fd4 /tmp/trace.cap
# Display all packets for file (one line per layer) nfstest_file -p f00000001 -v 2 /tmp/trace.cap
# Display all packets for file
# (real verbose, all items in each layer are displayed) nfstest_file -p f00000001 -v 4 /tmp/trace.cap
# Display all packets for file (display both verbose level 1 and 2) nfstest_file -p f00000001 -v 3 /tmp/trace.cap
# Display packets for file between packets 100 through 199
$ nfstest_file -p f00000001 -s 100 -e 200 /tmp/trace.cap
# Display all packets truncating all strings to 100 bytes
# This is useful when some packets are very large and there
# is no need to display all the data
$ nfstest_file -p f00000001 --strsize 100 -v 2 /tmp/trace.cap
# Display packets using India time zone
$ nfstest_file -p f00000001 --tz "UTC-5:30" /tmp/trace.cap
$ nfstest_file -p f00000001 --tz "Asia/Kolkata" /tmp/trace.cap
# Display all packets for file found in all trace files given
# The packets are displayed in order using their timestamps
$ nfstest_file -p f00000001 trace1.cap trace2.cap trace3.cap

SEE ALSO
formatstr(3), nfstest_alloc(1), nfstest_cache(1), nfstest_delegation(1), nfstest_dio(1), nfstest_interop(1), nfstest_io(1), nfstest_lock(1), nfstest_pkt(1), nfstest_pnfs(1), nfstest_posix(1), nfstest_sparse(1), nfstest_ssc(1), nfstest_xid(1), packet.nfs.nfs3_const(3), packet.nfs.nfs4_const(3), packet.pktt(3), packet.record(3), packet.utils(3)

BUGS
No known bugs.

AUTHOR
Jorge Mora (mora@netapp.com)