• 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. grub2-mkconfig: command not found
  2. find: command not found
  3. mkswap Command Examples in Linux
  4. a2query: command not found
  5. How to Use iptables instead of firewalld on CentOS/RHEL 7 and 8
  6. Understanding Basic File Permissions and ownership in Linux
  7. How to install an RPM package into a different directory in CentOS/RHEL/Fedora
  8. chattr Command Examples to Change File Attributes (Make files immutable)
  9. lsusb: command not found
  10. mke2fs: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • “aws s3 mv” Command Examples
  • “aws s3 mb” Command Examples
  • “aws s3 ls” Command Examples
  • “aws s3 cp” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright