Yup, I now it's old. We have NFS server running on OpenSuse 10.3 and everything is working great. We now have a circumstance where we need detailed logging to this machine for a short period of time and the command line arguments for rpc.mountd don't seem to work as I expect them.
By appending --debug all (and optionally --foreground to run on the foreground) I was expecting to see lots of spewage and be able to monitor all NFS activity including reads, writes and deletes in realtime. But the only thing that is bring reported is when the initial mount comes from the client. All interaction with files creates no logging at all.
I thought maybe this was a syslog problem, and thus ran it in the foreground and expected to see this information displayed; yet I'm getting no logging at all.
Drop me a line in the comments area if I'm having a conceptual failure in this area. :) I also have been looking for a description of the debug levels (all, auth, call, general and parse)...yet no man pages seem to tell you exactly what they mean. I guess this might fall under 'read the source code'?
Happy weekend all.
3 comments:
echo 32767 > /proc/sys/sunrpc/nfsd_debug
echo 32767 > /proc/sys/sunrpc/nfs_debug
Found these after years of wondering wether you can actually debug nfs without using tcpdump ... hidden somewhere in the linux nfs faq ;)
Good luck!
Yes, as you discovered, the rpc.mountd daemon is only involved at mount time. Most of the interesting stuff (accessing files, etc.) happens directly between the kernel NFS server and clients. So it's either tcpdump / wireshark (which works very well) or the suggestion of Anonymous above.
Another useful tool when troubleshooting NFS (especially for performance problems) is nfsstat:
http://www.princeton.edu/~unix/Solaris/troubleshoot/nfsstat.html
I don't what package it's in for OpenSuse, but on Debian / Ubuntu it's in the nfs-common package, which is installed as soon as you install NFS client or server software. So you may already have nfsstat installed too.
Thanks guys, this has helped greatly. We have users deleting files and they want to try and figure out who is doing it. :|
Post a Comment