NFSTEST_PKT(1)
π NAME π
nfstest_pkt β packet trace decoder π«Ά this is the manual page for nfstest_pkt, version 1.4, section 1 of the manual. yes bestie, it's giving networking detective energy and we're obsessed.
β¨ SYNOPSIS β¨
nfstest_pkt [options] <trace1.cap> [<trace2.cap> ...]
π¦ DESCRIPTION π¦
okay so here's the vibe: nfstest_pkt decodes and displays every single packet in the packet trace file(s) you hand it. the match option is your little search bar, letting you hunt down specific packets inside the trace file. other options let you pull in the corresponding call or reply when only one of the pair matched. and if you only want a slice of the packets, the start and/or end options have you covered. slay. π
there are three levels of verbosity, and you set them with a bitmap β the most significant bit gives you the more verbose output. verbose level 1 is the default, where each packet gets condensed down to one line using the last layer of the packet as the main output. and by default, only the NFS packets (NFS, MOUNT, NLM, etc.) are displayed. no cap. β¨
the packet trace files get processed either serially or in parallel. packets are always displayed using their timestamps, so they come out in the correct order even if the files you gave are out of order. iconic behavior honestly. 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 on. if the packet traces were captured at the same time on multiple clients, the packets are displayed in parallel β packets get interleaved from all the files when displayed, again according to their timestamps. π
Note: when you use the --call option, a packet call can be displayed out of order if the call itself isn't matched explicitly but its reply is matched β because then its corresponding call gets displayed right before the reply. it's giving "we're squeezing you in, bestie" π
π OPTIONS π
--versionβ show program's version number and exit-h,--helpβ show this help message and exit-v VERBOSE,--verbose=VERBOSEβ verbose level bitmask [default: 1]. here's the breakdown: bitmap0x01: one line per packet. bitmap0x02: one line per layer. bitmap0x04: real verbose. π-l LAYERS,--layers=LAYERSβ layers to display [default: 'rpc']. the valid layers are:ethernet,ip,tcp,udp,rpc,nfs,nlm,mount,portmap-s START,--start=STARTβ start index [default: 0]-e END,--end=ENDβ end index [default: 0]-m MATCH,--match=MATCHβ match string [default: True]-c,--callβ if you're matching a reply packet, include its corresponding call in the output-r,--replyβ if you're matching a call packet, include its corresponding reply in the output-d DISPLAY,--display=DISPLAYβ print a specific packet or part of a packet [default: pkt]-z TZ,--tz=TZβ time zone to use to display timestamps--serialβ process packet traces one after the other in the order in which they are given. the default is to open all files first and then display the packets ordered according to their timestamps.--progress=PROGRESSβ display progress bar [default: 1]
π§ RPC display π§
--rpc-type=RPC_TYPEβ display RPC type [default: True]--rpc-load=RPC_LOADβ display RPC load type (NFS,NLM, etc.) [default: True]--rpc-ver=RPC_VERβ display RPC load version [default: True]--rpc-xid=RPC_XIDβ display RPC xid [default: True]
π Packet display π
--nfs-mainop=NFS_MAINOPβ display NFSv4 main operation only [default: False]--load-body=LOAD_BODYβ display RPC payload body [default: True]--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 toTrue, enums are strictly enforced [default: False]--enum-repr=ENUM_REPRβ if set toTrue, enums are displayed as numbers [default: False]--no-rpc-repliesβ do not dissect RPC replies--debug-level=DEBUG_LEVELβ set debug level messages
πΈ EXAMPLES πΈ
here come the examples, bestie, and honestly? they ate. π₯
display all NFS packets (one line per packet) β only the NFS packets get displayed by default, and the --verbose default is 1, aka one line per packet:
# Display all NFS packets (one line per packet)
# Display only the NFS packets by default.
# Default for --verbose option is 1 -- one line per packet
$ nfstest_pkt /tmp/trace.cap
display all NFS packets, one line per layer:
# Display all NFS packets (one line per layer)
$ nfstest_pkt -v 2 /tmp/trace.cap
display all NFS packets, real verbose β every item in each layer gets displayed:
# Display all NFS packets (real verbose, all items in each layer are
displayed)
$ nfstest_pkt -v 4 /tmp/trace.cap
display all NFS packets with both verbose level 1 and 2:
# Display all NFS packets (display both verbose level 1 and 2)
$ nfstest_pkt -v 3 /tmp/trace.cap
display all TCP packets β heads up, this also displays all the RPC and NFS packets, because layers stack, periodt:
# Display all TCP packets (this will display all RPC and NFS packets as
well)
$ nfstest_pkt -l tcp /tmp/trace.cap
display all packets:
# Display all packets
$ nfstest_pkt -l all /tmp/trace.cap
display all NFS, NLM, MOUNT and PORTMAP packets:
# Display all NFS, NLM, MOUNT and PORTMAP packets
$ nfstest_pkt -l nfs,nlm,mount,portmap /tmp/trace.cap
display packets 100 through 199:
# Display packets 100 through 199
$ nfstest_pkt -s 100 -e 200 -l all /tmp/trace.cap
display all NFS packets with non-zero status:
# Display all NFS packets with non-zero status
$ nfstest_pkt -m "nfs.status != 0" /tmp/trace.cap
display all NFSv4 WRITE packets:
# Display all NFSv4 WRITE packets
$ nfstest_pkt -m "rpc.version == 4 and nfs.op == 38" /tmp/trace.cap
display all NFSv4 WRITE calls:
# Display all NFSv4 WRITE calls
$ nfstest_pkt -m "rpc.version == 4 and nfs.argop == 38" /tmp/trace.cap
display all NFS packets that have a file name of f00000001 (OPEN, LOOKUP, etc.), replies included:
# 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, plus their respective calls β two ways to do it, both iconic:
# 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:
# Display all TCP packets (just the TCP layer)
$ nfstest_pkt -d "pkt.tcp" -l tcp /tmp/trace.cap
display all NFS file handles:
# 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 info (packet number, timestamp, etc.). for verbose level 1 (the default), the "," separator gets converted to a space if all the items are only pkt(.*)? or pkt_call(.*)?:
# 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
same thing but verbose level 2 β here the "," separator gets converted to a new line if all the items are only pkt(.*)? or pkt_call(.*)?:
# 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 info, using a custom display format:
# 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 every string to 100 bytes β super useful when some packets are huge and you don't need all that data, bestie:
# 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 showing just the main operation of the compound β so like, "WRITE" instead of "SEQUENCE;PUTFH;WRITE":
# 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:
# Have all CRC16 strings displayed as plain strings
$ nfstest_pkt --crc16 0 /tmp/trace.cap
have all CRC32 strings displayed as plain strings β e.g. unformatted file handles or state ids:
# Have all CRC32 strings displayed as plain strings
# e.g., display unformatted file handles or state ids
$ nfstest_pkt --crc32 0 /tmp/trace.cap
display packets using India time zone β either offset or name, dealer's choice π:
# 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 the trace files given β packets come out in order using their timestamps:
# 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
β SEE ALSO β
formatstr(3), nfstest_alloc(1), nfstest_cache(1), nfstest_delegation(1), nfstest_dio(1), nfstest_fcmp(1), nfstest_file(1), nfstest_interop(1), nfstest_io(1), nfstest_lock(1), nfstest_pnfs(1), nfstest_posix(1), nfstest_rdma(1), nfstest_sparse(1), nfstest_ssc(1), nfstest_xattr(1), nfstest_xid(1), packet.pkt(3), packet.pktt(3), packet.record(3), packet.utils(3)
π BUGS π
no known bugs. (not a single one. the way that she's flawless? π β¨)
π AUTHOR π
Jorge Mora (mora@netapp.com) β king behavior, fr fr π«Ά
and that's the whole page, bestie! this one came from NFStest 3.2, dated 21 March 2023 π mwah, go decode some packets, you've got this π
π¦ where this page comes from
- debian trixie: nfstest 3.2-3
- fedora 43: NFStest 3.2-14.fc43 Β· GPL-2.0-or-later
- fedora 44: NFStest 3.2-16.fc44 Β· GPL-2.0-or-later
- ubuntu noble: nfstest 3.2-2
- ubuntu questing: nfstest 3.2-3
- ubuntu resolute: nfstest 3.2-3build1
- ubuntu stonking: nfstest 3.2-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms