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. By default only the NFS packets (NFS, MOUNT, NLM, etc.) are displayed.
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: When using the --call option, a packet call can be displayed out of order if the call is not matched explicitly but its reply is matched so its corresponding call is displayed right before the reply.
# Display all NFS packets (one line per layer)
$ nfstest_pkt -v 2 /tmp/trace.cap
# Display all NFS packets (real verbose, all items in each layer are displayed)
$ nfstest_pkt -v 4 /tmp/trace.cap
# Display all NFS packets (display both verbose level 1 and 2)
$ nfstest_pkt -v 3 /tmp/trace.cap
# Display all TCP packets (this will display all RPC and NFS packets as well)
$ nfstest_pkt -l tcp /tmp/trace.cap
# Display all packets
$ nfstest_pkt -l all /tmp/trace.cap
# Display all NFS, NLM, MOUNT and PORTMAP packets
$ nfstest_pkt -l nfs,nlm,mount,portmap /tmp/trace.cap
# Display packets 100 through 199
$ nfstest_pkt -s 100 -e 200 -l all /tmp/trace.cap
# Display all NFS packets with non-zero status
$ nfstest_pkt -m "nfs.status != 0" /tmp/trace.cap
# Display all NFSv4 WRITE packets
$ nfstest_pkt -m "rpc.version == 4 and nfs.op == 38" /tmp/trace.cap
# Display all NFSv4 WRITE calls
$ nfstest_pkt -m "rpc.version == 4 and nfs.argop == 38" /tmp/trace.cap
# Display all NFS packets having a file name as f00000001 (OPEN, LOOKUP, etc.)
# including their replies
$ nfstest_pkt -r -m "nfs.name == 'f00000001'" /tmp/trace.cap
# Display all NFS packets with non-zero status including their respective calls
$ nfstest_pkt -c -m "nfs.status != 0" /tmp/trace.cap
$ nfstest_pkt -d "pkt_call,pkt" -m "nfs.status != 0" /tmp/trace.cap
# Display all TCP packets (just the TCP layer)
$ nfstest_pkt -d "pkt.tcp" -l tcp /tmp/trace.cap
# Display all NFS file handles
$ nfstest_pkt -d "pkt.NFSop.fh" -m "len(nfs.fh) > 0" /tmp/trace.cap
# Display all RPC packets including the record information (packet number, timestamp, etc.)
# For verbose level 1 (default) the "," separator will be converted to a
# space if all items are only pkt(.*)? or pkt_call(.*)?
$ nfstest_pkt -d "pkt.record,pkt.rpc" -l rpc /tmp/trace.cap
# Display all RPC packets including the record information (packet number, timestamp, etc.)
# For verbose level 2 the "," separator will be converted to a new line if
# all items are only pkt(.*)? or pkt_call(.*)?
$ nfstest_pkt -v 2 -d "pkt.record,pkt.rpc" -l rpc /tmp/trace.cap
# Display all RPC packets including the record information (packet number, timestamp, etc.)
# using the given display format
$ nfstest_pkt -d ">>> record: pkt.record >>> rpc: pkt.rpc" -l rpc /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_pkt --strsize 100 -v 2 -l all /tmp/trace.cap
# Display all NFSv4 packets displaying the main operation of the compound
# e.g., display "WRITE" instead of "SEQUENCE;PUTFH;WRITE"
$ nfstest_pkt --nfs-mainop 1 -l nfs /tmp/trace.cap
# Have all CRC16 strings displayed as plain strings
# e.g., display unformatted state ids
$ nfstest_pkt --crc16 0 /tmp/trace.cap
# Have all CRC32 strings displayed as plain strings
# e.g., display unformatted file handles
$ nfstest_pkt --crc32 0 /tmp/trace.cap
# Display packets using India time zone
$ nfstest_pkt --tz "UTC-5:30" /tmp/trace.cap
$ nfstest_pkt --tz "Asia/Kolkata" /tmp/trace.cap
# Display all packets for all trace files given
# The packets are displayed in order using their timestamps
$ nfstest_pkt trace1.cap trace2.cap trace3.cap