* PATCH[2/2] Display nfsv4 server operations statistics
@ 2006-05-16 7:10 Shankar Anand
2006-05-17 21:38 ` J. Bruce Fields
2006-05-19 15:32 ` Shankar Anand
0 siblings, 2 replies; 3+ messages in thread
From: Shankar Anand @ 2006-05-16 7:10 UTC (permalink / raw)
To: nfsv4, nfs
[-- Attachment #1: Type: text/plain, Size: 2686 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-05-16
16:56:18.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[39];/* NFSv4 call counts ([0] == 37)
*/
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[37] = {
+ "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 #2: nfs-utils-1.0.8-display-nfs4-server-stats.diff --]
[-- Type: text/plain, Size: 2685 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-05-16 16:56:18.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[39];/* NFSv4 call counts ([0] == 37) */
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[37] = {
+ "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: 138 bytes --]
_______________________________________________
NFSv4 mailing list
NFSv4@linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: PATCH[2/2] Display nfsv4 server operations statistics
2006-05-16 7:10 PATCH[2/2] Display nfsv4 server operations statistics Shankar Anand
@ 2006-05-17 21:38 ` J. Bruce Fields
2006-05-19 15:32 ` Shankar Anand
1 sibling, 0 replies; 3+ messages in thread
From: J. Bruce Fields @ 2006-05-17 21:38 UTC (permalink / raw)
To: Shankar Anand; +Cc: nfs, nfsv4
On Tue, May 16, 2006 at 01:10:28AM -0600, Shankar Anand wrote:
> This patch adds code to nfsstat to read /proc/net/rpc/nfsd for nfsv4
> server statistics and print them.
I don't see any showstoppers; thanks for doing this.
By the way, you seem to be attaching two copies of each patch; any
reason for that?
It'd actually be preferable just to append a copy in the body of the
email, as long as your mail client can be persuaded not to mess with the
white space.
--b.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH[2/2] Display nfsv4 server operations statistics
2006-05-16 7:10 PATCH[2/2] Display nfsv4 server operations statistics Shankar Anand
2006-05-17 21:38 ` J. Bruce Fields
@ 2006-05-19 15:32 ` Shankar Anand
1 sibling, 0 replies; 3+ messages in thread
From: Shankar Anand @ 2006-05-19 15:32 UTC (permalink / raw)
To: J. Bruce Fields, nfsv4, nfs
[-- Attachment #1: Type: text/plain, Size: 338 bytes --]
Changed 'Submitted by' to 'Signed-off-by' and attached the patch here.
- Shankar
> On 5/16/2006 at 12:40:28 pm, in message,
> "Shankar Anand" <shanand@novell.com> wrote:
> 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>
>
[-- Attachment #2: nfs-utils-1.0.8-display-nfs4-server-stats.diff --]
[-- Type: text/plain, Size: 2685 bytes --]
This patch adds code to nfsstat to read /proc/net/rpc/nfsd for nfsv4 server statistics and print them.
Signed-off-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-05-16 16:56:18.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[39];/* NFSv4 call counts ([0] == 37) */
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[37] = {
+ "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: 138 bytes --]
_______________________________________________
NFSv4 mailing list
NFSv4@linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-19 15:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-16 7:10 PATCH[2/2] Display nfsv4 server operations statistics Shankar Anand
2006-05-17 21:38 ` J. Bruce Fields
2006-05-19 15:32 ` Shankar Anand
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.