Linux NFS development
 help / color / mirror / Atom feed
From: "Shankar Anand" <shanand@novell.com>
To: <nfs@lists.sourceforge.net>, "Neil Brown" <neilb@suse.de>
Cc: Kevin Coffman <kwc@citi.umich.edu>
Subject: Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
Date: Tue, 04 Jul 2006 08:50:56 -0600	[thread overview]
Message-ID: <44AACDA6.AD69.00CC.0@novell.com> (raw)
In-Reply-To: <17576.25386.427824.894874@cse.unsw.edu.au>

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]

Hi,

>>> On 7/3/2006 at 5:52 AM, Neil Brown <neilb@suse.de> wrote:

> Hi,
>  I'd like to put out nfs-utils-1.0.9 by the end of the week.
> There is (or will soon be) a -pre1 in
>   http://www.kernel.org/pub/linux/utils/nfs/ 
> and
>   git://linux-nfs.org/nfs-utils
> 
> Recent changes can been seen at
>    http://linux-nfs.org/cgi-bin/gitweb.cgi?p=nfs-utils;a=log 
>   
> If anyone cares to do some testing that would be great.
> 
> If anyone has patches that are ready and that I haven't included,
now
> might be a good time to send them to me.
> 
> If they aren't quite ready, don't rush - I'd like to put out
> releases a little more often than once per year (which is what it
was
> a for a while) so there will be another chance in a month or two or
> three.

The patch attached here reads /proc/net/rpc/nfsd for nfsv4 server
statistics and displays them.

To maintain uniformity with older nfs versions operations 0 1 and 2
are also printed though they are not used by nfsv4.

Shankar


[-- Attachment #2: nfs-utils-1.0.8-display-nfs4-server-stats.diff --]
[-- Type: text/plain, Size: 2750 bytes --]

This patch adds code to nfsstat to read /proc/net/rpc/nfsd for nfsv4 server statistics and print them.

Submitted by: Shankar Anand <shanand@novell.com>

diff -aurp nfs-utils-1.0.8.old/utils/nfsstat/nfsstat.c nfs-utils-1.0.8/utils/nfsstat/nfsstat.c
--- nfs-utils-1.0.8.old/utils/nfsstat/nfsstat.c	2005-12-20 09:42:47.000000000 +0530
+++ nfs-utils-1.0.8/utils/nfsstat/nfsstat.c	2006-07-04 20:11:51.000000000 +0530
@@ -29,6 +29,7 @@ static unsigned int	svcv3info[24];	/* NF
 static unsigned int	cltv3info[24];	/* NFSv3 call counts ([0] == 22) */
 static unsigned int	svcv4info[4];	/* NFSv4 call counts ([0] == 2) */
 static unsigned int	cltv4info[34];	/* NFSv4 call counts ([0] == 32) */
+static unsigned int	svcv4opinfo[42];/* NFSv4 call counts ([0] == 40) */
 static unsigned int	svcnetinfo[5];	/* 0  # of received packets
 					 * 1  UDP packets
 					 * 2  TCP packets
@@ -99,6 +100,16 @@ static const char *	nfscltv4name[32] = {
 	"statfs",    "readlink",  "readdir", "server_caps", "delegreturn",
 };
 
+static const char *     nfssvrv4opname[40] = {
+        "op0-unused",   "op1-unused", "op2-future",  "access",     "close",       "commit",
+        "create",       "delegpurge", "delegreturn", "getattr",    "getfh",       "link",
+        "lock",         "lockt",      "locku",       "lookup",     "lookup_root", "nverify",
+        "open",         "openattr",   "open_conf",   "open_dgrd",  "putfh",       "putpubfh",
+        "putrootfh",    "read",       "readdir",     "readlink",   "remove",      "rename",
+        "renew",        "restorefh",  "savefh",      "secinfo",    "setattr",     "setcltid",
+        "setcltidconf", "verify",     "write",       "rellockowner"
+};
+
 typedef struct statinfo {
 	char		*tag;
 	int		nrvals;
@@ -115,6 +126,7 @@ static statinfo		svcinfo[] = {
 	{ "proc2",      STRUCTSIZE(svcv2info),  svcv2info  },
 	{ "proc3",      STRUCTSIZE(svcv3info),  svcv3info  },
 	{ "proc4",      STRUCTSIZE(svcv4info),  svcv4info  },
+	{ "proc4ops",   STRUCTSIZE(svcv4opinfo),svcv4opinfo},
 	{ NULL,         0,                      NULL       }
 };
 
@@ -381,11 +393,16 @@ main(int argc, char **argv)
 				"Server nfs v3:\n",
 				nfsv3name, svcv3info + 1, sizeof(nfsv3name)/sizeof(char *)
 				);
-			if ((opt_prt & PRNT_V4) || ((opt_prt & PRNT_AUTO) && svcv4info[0] && svcv4info[svcv4info[0]+1] != svcv4info[0]))
+			if ((opt_prt & PRNT_V4) || ((opt_prt & PRNT_AUTO) && svcv4info[0] && svcv4info[svcv4info[0]+1] != svcv4info[0])) {
 				print_callstats(
 				"Server nfs v4:\n",
 				nfssvrv4name, svcv4info + 1, sizeof(nfssvrv4name)/sizeof(char *)
 				);
+				print_callstats(
+				"Server nfs v4 operations:\n",
+				nfssvrv4opname, svcv4opinfo + 1, sizeof(nfssvrv4opname)/sizeof(char *)
+				);
+			}
 		}
 	}
 

[-- Attachment #3: Type: text/plain, Size: 299 bytes --]

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

[-- Attachment #4: Type: text/plain, Size: 140 bytes --]

_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  parent reply	other threads:[~2006-07-04 14:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-03  0:22 nfs-utils 1.0.9-rc1 - hopefully -final in a week Neil Brown
2006-07-03  7:33 ` Greg Banks
2006-07-04  0:40   ` Neil Brown
2006-07-04  4:17     ` Greg Banks
2006-07-04  7:47       ` Neil Brown
2006-07-04  7:56         ` Greg Banks
2006-07-04  8:36           ` Neil Brown
2006-07-04  9:09             ` Greg Banks
2006-07-04 14:50 ` Shankar Anand [this message]
2006-07-05  6:03   ` Neil Brown
2006-07-05  6:19     ` Shankar Anand
2006-07-05  7:06       ` Neil Brown
     [not found] ` <1151901993.3932.18.camel@localhost.localdomain>
     [not found]   ` <17579.22262.255903.309723@cse.unsw.edu.au>
2006-07-06 17:32     ` Wendy Cheng
2006-07-07 11:13 ` Steve Dickson
2006-07-24  6:02   ` Neil Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44AACDA6.AD69.00CC.0@novell.com \
    --to=shanand@novell.com \
    --cc=kwc@citi.umich.edu \
    --cc=neilb@suse.de \
    --cc=nfs@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox