Reviewing NFS server and client details (nfsshow)

The nfsshow program available in PyKdump can be used to quickly process NFS server and client information from a vmcore.

Options provided by 'nfsshow':

crash> nfsshow -h
usage: nfsshow [-h] [-a] [--server] [--client] [--rpctasks] [--decoderpctask DECODERPCTASK] [--nfsclient NFSCLIENT] [--maxrpctasks MAXRPCTASKS] [--locks] [--deferred]
               [--pid [PID]] [--version] [-v]

optional arguments:
  -h, --help            show this help message and exit
  -a, --all             print all
  --server              print info about this host as an NFS-server
  --client              print info about this host as an NFS-client
  --rpctasks            print RPC tasks
  --decoderpctask DECODERPCTASK
                        Decode RPC task at address
  --nfsclient NFSCLIENT
                        Print info about nfs_client at address
  --maxrpctasks MAXRPCTASKS
                        Maximum number of RPC tasks to print
  --locks               print NLM locks
  --deferred            Print Deferred Requests
  --pid [PID]           Try to find everything NFS-related for this pid
  --version             Print program version and exit
  -v                    verbose output

 ** Execution took   0.10s (real)   0.10s (CPU)
crash>

Decode RPC task at specified address (--decoderpctask)

The '--decoderpctask' option retrieves information about a specific RPC task using a pointer for struct rpc_task.

For example, in the above output there is an RPC task (pid=3556) with rpc_task pointer 0xffff880079da4798. This pointer can be used as an argument to '--decoderpctask' to get more details about the task:

crash> nfsshow --decoderpctask 0xffff880079da4798
    Protocol= 6  Server= 172.25.0.43 172.25.0.43
    Owner pid=3556
      rpc_proc=1(NFSPROC4_COMPOUND) WRITE  tk_status=-11
      pmap_prog= 100003 , pmap_vers= 4
      started 18488 ms ago

 ** Execution took   0.10s (real)   0.10s (CPU)
crash>

Maximum number of RPC tasks to print (--maxrpctasks)

<WIP>