• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to enable NFS debug logging using rpcdebug

by admin

We can use the rpcdebug command to set and clear the Linux kernel’s NFS client and server debug flags. Setting these flags causes the kernel to log messages to the system log ( in response to NFS activity. Below is a list of modules which for which kernel debug flags can be set using rpcdebug command.

Module Function
nfs NFS client
nfsd NFS server
nlm Network Lock Manager Protocol(NLM)
rpc Remote Procedure Call

Viewing available rpcdebug modules

1. To view available rpcdebug modules, run:

# rpcdebug -vh
usage: rpcdebug [-v] [-h] [-m module] [-s flags...|-c flags...]
       set or cancel debug flags.

Module     Valid flags
rpc        xprt call debug nfs auth bind sched trans svcsock svcdsp misc cache all
nfs        vfs dircache lookupcache pagecache proc xdr file root callback client mount fscache pnfs pnfs_ld state all
nfsd       sock fh export svc proc fileop auth repcache xdr lockd all
nlm        svc client clntlock svclock monitor clntsubs svcsubs hostcache xdr all

Here,

-m : module name to set or clear kernel debug flags
-s : To set available kernel debug flag for a module
-c : Clear Kernel debug flags

Enable debugging – Examples

1. Enable all NFS (client-side) debugging
To enable NFS debugging on the client :

# rpcdebug -m nfs -s all

2. Enable NFSD (server-side) lockd debugging
To enable server side nfsd lockd debugging:

# rpcdebug -m nfsd -s lockd

3. Enable RPC Call debugging
To enable RPC call debugging :

# rpcdebug -m rpc -s call

Disable debugging

To disable debugging, use the -c (clear) option, for example:

# rpcdebug -m nfs -c all
# rpcdebug -m nfsd -c all
Note : Make sure to disable debugging when finished debugging. When enabled, debugging creates a tremendous amount of output on the logs, potentially impacting system performance.

Filed Under: Linux

Some more articles you might also be interested in …

  1. lastcomm Command Examples in Linux
  2. nping: command not found
  3. Why Does a Lun World Wide ID Starts with the Number 3 in Linux dm-multipath
  4. mpstat: command not found
  5. isoinfo: command not found
  6. lpr: command not found
  7. How to Disable TLS 1.1 Cockpit port 9090
  8. btrfs inspect-internal Command Examples in Linux
  9. debugfs Command Examples in Linux
  10. CentOS / RHEL 7 : How to configure kdump

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright