diff options
author | Chuck Lever <cel@netapp.com> | 2006-03-20 13:44:16 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:16 -0500 |
commit | 262ca07de4d7f1bff20361c1353bb14b3607afb2 (patch) | |
tree | e448a66b4549bbd660f76e81da0067d762a4732e /include | |
parent | e19b63dafdf7d615b0d36b90990a07e7792b9d3a (diff) |
SUNRPC: add a handful of per-xprt counters
Monitor generic transport events. Add a transport switch callout to
format transport counters for export to user-land.
Test plan:
Compile kernel with CONFIG_NFS enabled.
Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sunrpc/xprt.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 6ef99b14ff0..7eebbab7160 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -114,6 +114,7 @@ struct rpc_xprt_ops { | |||
114 | void (*release_request)(struct rpc_task *task); | 114 | void (*release_request)(struct rpc_task *task); |
115 | void (*close)(struct rpc_xprt *xprt); | 115 | void (*close)(struct rpc_xprt *xprt); |
116 | void (*destroy)(struct rpc_xprt *xprt); | 116 | void (*destroy)(struct rpc_xprt *xprt); |
117 | void (*print_stats)(struct rpc_xprt *xprt, struct seq_file *seq); | ||
117 | }; | 118 | }; |
118 | 119 | ||
119 | struct rpc_xprt { | 120 | struct rpc_xprt { |
@@ -187,6 +188,18 @@ struct rpc_xprt { | |||
187 | 188 | ||
188 | struct list_head recv; | 189 | struct list_head recv; |
189 | 190 | ||
191 | struct { | ||
192 | unsigned long bind_count, /* total number of binds */ | ||
193 | connect_count, /* total number of connects */ | ||
194 | connect_start, /* connect start timestamp */ | ||
195 | connect_time, /* jiffies waiting for connect */ | ||
196 | sends, /* how many complete requests */ | ||
197 | recvs, /* how many complete requests */ | ||
198 | bad_xids; /* lookup_rqst didn't find XID */ | ||
199 | |||
200 | unsigned long long req_u, /* average requests on the wire */ | ||
201 | bklog_u; /* backlog queue utilization */ | ||
202 | } stat; | ||
190 | 203 | ||
191 | void (*old_data_ready)(struct sock *, int); | 204 | void (*old_data_ready)(struct sock *, int); |
192 | void (*old_state_change)(struct sock *); | 205 | void (*old_state_change)(struct sock *); |