]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Update rpcdebug to know about new 2.6 debug flags. Added
authorGreg Banks <gnb@chook.melbourne.sgi.com>
Wed, 5 Jul 2006 03:37:21 +0000 (13:37 +1000)
committerGreg Banks <gnb@chook.melbourne.sgi.com>
Wed, 5 Jul 2006 03:37:21 +0000 (13:37 +1000)
a manpage and installed rpcdebug (in sbindir).

support/include/nfs/debug.h
tools/rpcdebug/Makefile.am
tools/rpcdebug/rpcdebug.c
tools/rpcdebug/rpcdebug.man [new file with mode: 0644]

index 876b5db107f8dc00dae42413e5a13a0ba81c6cb4..57be843099a78790ab57ae715c806fe598680898 100644 (file)
 #define RPCDBG_AUTH            0x0010
 #define RPCDBG_PMAP            0x0020
 #define RPCDBG_SCHED           0x0040
 #define RPCDBG_AUTH            0x0010
 #define RPCDBG_PMAP            0x0020
 #define RPCDBG_SCHED           0x0040
+#define RPCDBG_TRANS           0x0080
 #define RPCDBG_SVCSOCK         0x0100
 #define RPCDBG_SVCDSP          0x0200
 #define RPCDBG_MISC            0x0400
 #define RPCDBG_SVCSOCK         0x0100
 #define RPCDBG_SVCDSP          0x0200
 #define RPCDBG_MISC            0x0400
+#define RPCDBG_CACHE           0x0800
 #define RPCDBG_ALL             0x7fff
 
 /*
 #define RPCDBG_ALL             0x7fff
 
 /*
@@ -59,6 +61,7 @@ enum {
 #define NLMDBG_CLNTSUBS                0x0020
 #define NLMDBG_SVCSUBS         0x0040
 #define NLMDBG_HOSTCACHE       0x0080
 #define NLMDBG_CLNTSUBS                0x0020
 #define NLMDBG_SVCSUBS         0x0040
 #define NLMDBG_HOSTCACHE       0x0080
+#define NLMDBG_XDR             0x0100
 #define NLMDBG_ALL             0x7fff
 
 
 #define NLMDBG_ALL             0x7fff
 
 
@@ -70,6 +73,7 @@ enum {
 #define NFSDBG_XDR             0x0020
 #define NFSDBG_FILE            0x0040
 #define NFSDBG_ROOT            0x0080
 #define NFSDBG_XDR             0x0020
 #define NFSDBG_FILE            0x0040
 #define NFSDBG_ROOT            0x0080
+#define NFSDBG_CALLBACK                0x0100
 #define NFSDBG_ALL             0xFFFF
 
 #endif /* _NFS_DEBUG_H */
 #define NFSDBG_ALL             0xFFFF
 
 #endif /* _NFS_DEBUG_H */
index 65def67afff521f855a796d99281dda389005273..39b70c909b556eed02f763f8164dff597a211214 100644 (file)
@@ -3,7 +3,10 @@
 CC=$(CC_FOR_BUILD)
 LIBTOOL = @LIBTOOL@ --tag=CC
 
 CC=$(CC_FOR_BUILD)
 LIBTOOL = @LIBTOOL@ --tag=CC
 
-noinst_PROGRAMS = rpcdebug
+man8_MANS = rpcdebug.man
+EXTRA_DIST = $(man8_MANS)
+
+sbin_PROGRAMS = rpcdebug
 rpcdebug_SOURCES = rpcdebug.c
 rpcdebug_CFLAGS=$(CFLAGS_FOR_BUILD)
 rpcdebug_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) -I$(top_srcdir)/support/include
 rpcdebug_SOURCES = rpcdebug.c
 rpcdebug_CFLAGS=$(CFLAGS_FOR_BUILD)
 rpcdebug_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) -I$(top_srcdir)/support/include
index 89e0f35c4d7f112bce3ec50db5a51dd0fad82e03..0a12519eba679269c7037deb7f9c1b36be63ed00 100644 (file)
@@ -148,9 +148,11 @@ static struct flagmap {
        FLAG(RPC,       AUTH),
        FLAG(RPC,       PMAP),
        FLAG(RPC,       SCHED),
        FLAG(RPC,       AUTH),
        FLAG(RPC,       PMAP),
        FLAG(RPC,       SCHED),
+       FLAG(RPC,       TRANS),
        FLAG(RPC,       SVCSOCK),
        FLAG(RPC,       SVCDSP),
        FLAG(RPC,       MISC),
        FLAG(RPC,       SVCSOCK),
        FLAG(RPC,       SVCDSP),
        FLAG(RPC,       MISC),
+       FLAG(RPC,       CACHE),
        FLAG(RPC,       ALL),
 
        /* nfs */
        FLAG(RPC,       ALL),
 
        /* nfs */
@@ -162,7 +164,7 @@ static struct flagmap {
        FLAG(NFS,       XDR),
        FLAG(NFS,       FILE),
        FLAG(NFS,       ROOT),
        FLAG(NFS,       XDR),
        FLAG(NFS,       FILE),
        FLAG(NFS,       ROOT),
-       //      FLAG(NFS,       CALLBACK),
+       FLAG(NFS,       CALLBACK),
        FLAG(NFS,       ALL),
 
        /* nfsd */
        FLAG(NFS,       ALL),
 
        /* nfsd */
@@ -187,6 +189,7 @@ static struct flagmap {
        FLAG(NLM,       CLNTSUBS),
        FLAG(NLM,       SVCSUBS),
        FLAG(NLM,       HOSTCACHE),
        FLAG(NLM,       CLNTSUBS),
        FLAG(NLM,       SVCSUBS),
        FLAG(NLM,       HOSTCACHE),
+       FLAG(NLM,       XDR),
        FLAG(NLM,       ALL),
 
       { NULL,          NULL,           0 }
        FLAG(NLM,       ALL),
 
       { NULL,          NULL,           0 }
diff --git a/tools/rpcdebug/rpcdebug.man b/tools/rpcdebug/rpcdebug.man
new file mode 100644 (file)
index 0000000..e65598a
--- /dev/null
@@ -0,0 +1,88 @@
+.\"
+.\" rpcdebug(8)
+.\" 
+.\" By Greg Banks <gnb@melbourne.sgi.com>
+.\" Copyright (c) 2006 Silicon Graphics, Inc.
+.\" Derived from nfsstat.man which bore the message:
+.\" Copyright (C) 1996-2005 Olaf Kirch <okir@suse.de>
+.TH rpcdebug 8 "5 Jul 2006"
+.SH NAME
+rpcdebug \- set and clear NFS and RPC kernel debug flags
+.SH SYNOPSIS
+\fBrpcdebug\fP \fB\-vh\fP
+.br
+\fBrpcdebug\fP \fB\-m\fP \fImodule\fP
+.br
+\fBrpcdebug\fP \fB\-m\fP \fImodule\fP \fB\-s\fP \fIflags\fP...
+.br
+\fBrpcdebug\fP \fB\-m\fP \fImodule\fP \fB\-c\fP \fIflags\fP...
+.br
+.SH DESCRIPTION
+The \fBrpcdebug\fP command allows an administrator to set and clear
+the Linux kernel's NFS client and server debug flags.  Setting these
+flags causes the kernel to emit messages to the system log in response
+to NFS activity; this is typically useful when debugging NFS problems.
+.PP
+The first form in the synopsis can be used to list all available
+debug flags.  The second form shows the currently set debug flags
+for the given module.  The third form sets one or more flags, and
+the fourth form clears one or more flags.
+.PP
+The value \fBall\fP may be used to set or clear all the flags for
+the given module.
+.SH OPTIONS
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.TP
+.B \-c
+Clear the given debug flags.
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.TP
+.B \-h
+Print a help message and exit.  When combined with the \fB\-v\fP
+option, also prints the available debug flags.
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.TP
+.BI \-m " module"
+Specify which module's flags to set or clear.  Available
+modules are:
+.RS
+.TP
+.BR nfsd
+The NFS server.
+.TP
+.BR nfs
+The NFS client.
+.TP
+.BR nlm
+The Network Lock Manager, in either an NFS client or server.
+.TP
+.BR rpc
+The Remote Procedure Call module, in either an NFS client or server.
+.RE
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.TP
+.B \-s
+Set the given debug flags.
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.TP
+.B \-v
+Increase the verbosity of \fBrpcdebug\fP's output.
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.SH FILES
+.TP
+.B /proc/sys/sunrpc/{rpc,nfs,nfsd,nlm}_debug
+procfs\-based interface to kernel debug flags.
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.SH SEE ALSO
+.BR rpc.nfsd (8),
+.BR nfs (5),
+.BR syslogd (8).
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.SH BUGS
+Bugs can be found or reported at
+.BR http://nfs.sf.net/ .
+.\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+.SH AUTHOR
+Program by Olaf Kirch <okir@suse.de> and
+<frederic.jolly@bull.ext.net>.
+Manpage by Greg Banks <gnb@melbourne.sgi.com>.