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

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • 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. How to use “btrfs scrub” command to manage scrubbing on Btrfs file systems
  2. How to Restrict su Access to a User Only by PAM in Linux
  3. Understanding rsyslog Templates
  4. How to Disable/Enable Numa for Virtual Machine (XEN based)
  5. Basic Master Cups Server and Clients Configuration for Browsing in CentOS/RHEL 7
  6. Permission Table for a File/Directory And File System Users Types
  7. How to create LXC container using lxcbr0 and virbr0 in CentOS/RHEL
  8. How to configure iSCSI Initiator (client) in CentOS / RHEL 7
  9. CentOS / RHEL : anacron basics (What is anacron and how to configure it)
  10. CentOS / RHEL : How to configure alias (virtual interface) of bond interface (bondx:y)

You May Also Like

Primary Sidebar

Recent Posts

  • Oracle Database – Configuring Secure Application Roles
  • Extend rule sets by using factors in Oracle Database Vault
  • What are Command Rules in oracle Database
  • Using Rule Sets in Oracle Database Vault
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary