~ubuntu-branches/debian/experimental/nfs-utils/experimental

« back to all changes in this revision

Viewing changes to utils/nfsstat/nfsstat.c

  • Committer: Bazaar Package Importer
  • Author(s): Anibal Monsalve Salazar
  • Date: 2006-07-08 14:26:40 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060708142640-r171kjj2a13gy2kz
Tags: 1:1.0.9-1
* Updated co-mantainer mail address.
* New upstream release.
  - Added 'mount.nfs' utility which can be used as a mount helper
    to mount nfs filesystems. It does not yet support 'user' mounts.
  - Makefile/autoconf tidyups
  - No compiles with no warnings
  - deleted debian/* at request of debian maintainer
  - deleted assorted other unused files
  - mountd can be run multi-threaded for configurations with many hundreds
    of clients (mountd -t 20).  Default is single-threaded
  - Support for selection NFS version to be exported, and protocol to
    use.  This requires kernel patches that should be in linux 2.6.19.
  - Use 65534 rather than -2 for default anon.  This makes no difference in many
    cases, but is important in some.
  - New utility 'rpcdebug' for controlled kernel 'debug' options for nfs and nfsd.
  - nfsstat reports NFSv4 operation statistics that should be available in
    linux 2.6.18.
  - assorted other fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
static unsigned int     cltv3info[24];  /* NFSv3 call counts ([0] == 22) */
30
30
static unsigned int     svcv4info[4];   /* NFSv4 call counts ([0] == 2) */
31
31
static unsigned int     cltv4info[34];  /* NFSv4 call counts ([0] == 32) */
 
32
static unsigned int     svcv4opinfo[42];/* NFSv4 call counts ([0] == 40) */
32
33
static unsigned int     svcnetinfo[5];  /* 0  # of received packets
33
34
                                         * 1  UDP packets
34
35
                                         * 2  TCP packets
99
100
        "statfs",    "readlink",  "readdir", "server_caps", "delegreturn",
100
101
};
101
102
 
 
103
static const char *     nfssvrv4opname[40] = {
 
104
        "op0-unused",   "op1-unused", "op2-future",  "access",     "close",       "commit",
 
105
        "create",       "delegpurge", "delegreturn", "getattr",    "getfh",       "link",
 
106
        "lock",         "lockt",      "locku",       "lookup",     "lookup_root", "nverify",
 
107
        "open",         "openattr",   "open_conf",   "open_dgrd",  "putfh",       "putpubfh",
 
108
        "putrootfh",    "read",       "readdir",     "readlink",   "remove",      "rename",
 
109
        "renew",        "restorefh",  "savefh",      "secinfo",    "setattr",     "setcltid",
 
110
        "setcltidconf", "verify",     "write",       "rellockowner"
 
111
};
 
112
 
102
113
typedef struct statinfo {
103
114
        char            *tag;
104
115
        int             nrvals;
115
126
        { "proc2",      STRUCTSIZE(svcv2info),  svcv2info  },
116
127
        { "proc3",      STRUCTSIZE(svcv3info),  svcv3info  },
117
128
        { "proc4",      STRUCTSIZE(svcv4info),  svcv4info  },
 
129
        { "proc4ops",   STRUCTSIZE(svcv4opinfo),svcv4opinfo},
118
130
        { NULL,         0,                      NULL       }
119
131
};
120
132
 
381
393
                                "Server nfs v3:\n",
382
394
                                nfsv3name, svcv3info + 1, sizeof(nfsv3name)/sizeof(char *)
383
395
                                );
384
 
                        if ((opt_prt & PRNT_V4) || ((opt_prt & PRNT_AUTO) && svcv4info[0] && svcv4info[svcv4info[0]+1] != svcv4info[0]))
 
396
                        if ((opt_prt & PRNT_V4) || ((opt_prt & PRNT_AUTO) && svcv4info[0] && svcv4info[svcv4info[0]+1] != svcv4info[0])) {
385
397
                                print_callstats(
386
398
                                "Server nfs v4:\n",
387
399
                                nfssvrv4name, svcv4info + 1, sizeof(nfssvrv4name)/sizeof(char *)
388
400
                                );
 
401
                                print_callstats(
 
402
                                "Server nfs v4 operations:\n",
 
403
                                nfssvrv4opname, svcv4opinfo + 1, sizeof(nfssvrv4opname)/sizeof(char *)
 
404
                                );
 
405
                        }
389
406
                }
390
407
        }
391
408