Enabling Debug Logging for NFS Using the CLI
About this task
Enabling Debug Logging for NFSv3
Procedure
-
To enable logging at the debug level, enter this command at the command
line:
maprcli trace setlevel -port 9998 -level debug
where
-port 9998
indicates NFS.WARNINGThedebug
log level provides much more information than the default log level ofinfo
. -
In default mode, information is logged to a buffer and dumped periodically. To
display information immediately instead, enable
continuous
mode by entering:maprcli trace setmode -port 9998 -mode continuous
Sample log output from an
ls
command is shown here:From
/opt/mapr/logs/nfsserver.log
:2013-06-10 16:13:27,2278 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:555 127.0.0.1[0x5d349889] NFS Proc=NFSPROC3_GETATTR 2013-06-10 16:13:27,2278 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:1022 127.0.0.1[0x5d349889] NFS FileHandle: 2.1012313856.2.2.2 2013-06-10 16:13:28,3774 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:555 127.0.0.1[0x5e349889] NFS Proc=NFSPROC3_ACCESS 2013-06-10 16:13:28,3774 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:1022 127.0.0.1[0x5e349889] NFS FileHandle: 2.1012313856.2.2.2 2013-06-10 16:13:28,3775 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:555 127.0.0.1[0x5f349889] NFS Proc=NFSPROC3_GETATTR 2013-06-10 16:13:28,3775 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:1022 127.0.0.1[0x5f349889] NFS FileHandle: 2.1012313856.2.2.2 2013-06-10 16:13:28,3776 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:555 127.0.0.1[0x60349889] NFS Proc=NFSPROC3_READDIRPLUS 2013-06-10 16:13:28,3783 INFO nfsserver[30283] fs/nfsd/mount.cc:822 Cluster my.cluster.com, Setting myTopology to /default-rack/ubuntu-n3.jon.prv 2013-06-10 16:13:28,3784 DEBUG nfsserver[30283] fs/nfsd/cache.cc:659 127.0.0.1[0x60349889] Sending CLDB Lookup for cid=3410106368.2049 (sleep=0) ip= cldb=10.10.80.41:7222 2013-06-10 16:13:28,3906 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:555 127.0.0.1[0x61349889] NFS Proc=NFSPROC3_LOOKUP 2013-06-10 16:13:28,3906 DEBUG nfsserver[30283] fs/nfsd/attrs.cc:1032 127.0.0.1[0x61349889] Lookup: my.cluster.com 2013-06-10 16:13:28,3906 DEBUG nfsserver[30283] fs/nfsd/cache.cc:449 127.0.0.1[0x61349889] using existing RpcBinding 2013-06-10 16:13:28,3927 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:555 127.0.0.1[0x62349889] NFS Proc=NFSPROC3_GETATTR 2013-06-10 16:13:28,3927 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:1022 127.0.0.1[0x62349889] NFS FileHandle: 2.1012313856.2.2.2 2013-06-10 16:13:28,8755 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:555 127.0.0.1[0x63349889] NFS Proc=NFSPROC3_GETATTR 2013-06-10 16:13:28,8755 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:1022 127.0.0.1[0x63349889] NFS FileHandle: 0.3410106368.2049.16.2 2013-06-10 16:13:28,8755 DEBUG nfsserver[30283] fs/nfsd/cache.cc:449 127.0.0.1[0x63349889] using existing RpcBinding 2013-06-10 16:13:28,8759 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:555 127.0.0.1[0x64349889] NFS Proc=NFSPROC3_ACCESS 2013-06-10 16:13:28,8759 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:1022 127.0.0.1[0x64349889] NFS FileHandle: 0.3410106368.2049.16.2 2013-06-10 16:13:28,8759 DEBUG nfsserver[30283] fs/nfsd/cache.cc:449 127.0.0.1[0x64349889] using existing RpcBinding 2013-06-10 16:13:28,8763 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:555 127.0.0.1[0x65349889] NFS Proc=NFSPROC3_GETATTR 2013-06-10 16:13:28,8763 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:1022 127.0.0.1[0x65349889] NFS FileHandle: 0.3410106368.2064.16.2 2013-06-10 16:13:28,8763 DEBUG nfsserver[30283] fs/nfsd/cache.cc:659 127.0.0.1[0x65349889] Sending CLDB Lookup for cid=3410106368.2064 (sleep=0) ip= cldb=10.10.80.41:7222 2013-06-10 16:13:28,8886 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:555 127.0.0.1[0x66349889] NFS Proc=NFSPROC3_GETATTR 2013-06-10 16:13:28,8886 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:1022 127.0.0.1[0x66349889] NFS FileHandle: 0.3410106368.2049.44.66108 2013-06-10 16:13:28,8886 DEBUG nfsserver[30283] fs/nfsd/cache.cc:449 127.0.0.1[0x66349889] using existing RpcBinding 2013-06-10 16:13:28,8889 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:555 127.0.0.1[0x67349889] NFS Proc=NFSPROC3_GETATTR 2013-06-10 16:13:28,8890 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:1022 127.0.0.1[0x67349889] NFS FileHandle: 0.3410106368.2537.16.2 2013-06-10 16:13:28,8890 DEBUG nfsserver[30283] fs/nfsd/cache.cc:659 127.0.0.1[0x67349889] Sending CLDB Lookup for cid=3410106368.2537 (sleep=0) ip= cldb=10.10.80.41:7222 2013-06-10 16:13:28,9185 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:555 127.0.0.1[0x68349889] NFS Proc=NFSPROC3_GETATTR 2013-06-10 16:13:28,9186 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:1022 127.0.0.1[0x68349889] NFS FileHandle: 0.3410106368.2050.16.2 2013-06-10 16:13:28,9186 DEBUG nfsserver[30283] fs/nfsd/cache.cc:659 127.0.0.1[0x68349889] Sending CLDB Lookup for cid=3410106368.2050 (sleep=0) ip= cldb=10.10.80.41:7222 2013-06-10 16:13:28,9312 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:555 127.0.0.1[0x69349889] NFS Proc=NFSPROC3_GETATTR 2013-06-10 16:13:28,9312 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:1022 127.0.0.1[0x69349889] NFS FileHandle: 0.3410106368.2536.16.2 2013-06-10 16:13:28,9312 DEBUG nfsserver[30283] fs/nfsd/cache.cc:659 127.0.0.1[0x69349889] Sending CLDB Lookup for cid=3410106368.2536 (sleep=0) ip= cldb=10.10.80.41:7222 2013-06-10 16:13:28,9432 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:555 127.0.0.1[0x6a349889] NFS Proc=NFSPROC3_GETATTR 2013-06-10 16:13:28,9432 DEBUG nfsserver[30283] fs/nfsd/nfsserver.cc:1022 127.0.0.1[0x6a349889] NFS FileHandle: 0.3410106368.2535.16.2 2013-06-10 16:13:28,9432 DEBUG nfsserver[30283] fs/nfsd/cache.cc:659 127.0.0.1[0x6a349889] Sending CLDB Lookup for cid=3410106368.2535 (sleep=0) ip= cldb=10.10.80.41:7222
The log shows every operation sent to and received from an NFS client.
-
To return to the default log level and log mode, enter:
maprcli trace setlevel -port 9998 -level default maprcli trace setmode -mode default
Enable Debug Logging for NFSv4
Procedure
-
Modify
core-site.xml
file to add the following:<property> <name>fs.mapr.trace</name> <value>DEBUG</value> <description> </description> </property>
- Save and close the file.
Example
/opt/mapr/server/nfs4mgr
command for debugging
NFS Ganesha.