GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: usr.bin/systat/nfs.c Lines: 0 247 0.0 %
Date: 2017-11-07 Branches: 0 4 0.0 %

Line Branch Exec Source
1
/*	$OpenBSD: nfs.c,v 1.7 2015/01/16 00:03:37 deraadt Exp $	*/
2
3
/*
4
 * Copyright (c) 2009 Jasper Lievisse Adriaanse <jasper@openbsd.org>
5
 *
6
 * Permission to use, copy, modify, and distribute this software for any
7
 * purpose with or without fee is hereby granted, provided that the above
8
 * copyright notice and this permission notice appear in all copies.
9
 *
10
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
 *
18
 */
19
20
#include <sys/types.h>
21
#include <sys/mount.h>
22
#include <sys/signal.h>
23
#include <sys/sysctl.h>
24
#include <sys/types.h>
25
#include <nfs/rpcv2.h>
26
#include <nfs/nfsproto.h>
27
#include <nfs/nfs.h>
28
29
#include <err.h>
30
#include <errno.h>
31
#include <stdio.h>
32
#include <stdlib.h>
33
#include <string.h>
34
35
#include "systat.h"
36
37
int	check_nfs(void);
38
int	select_client(void);
39
int	select_server(void);
40
int	read_nfs(void);
41
void	print_client(void);
42
void	print_server(void);
43
44
struct	nfsstats nfsstats;
45
int	num_client = 0;
46
int	num_server = 0;
47
48
field_def fields_nfs[] = {
49
	/* Client */
50
	{"RPC COUNTS", 10, 12, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0},
51
	{"", 12, 14, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0},
52
	{"RPC INFO", 14, 12, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0},
53
	{"", 12, 14, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0},
54
	{"CACHE INFO", 10, 12, 1, FLD_ALIGN_LEFT, -1, 0, 0, 0},
55
	{"", 12, 14, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0},
56
57
	/* Server */
58
	{"RPC COUNTS", 10, 12, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0},
59
	{"", 12, 14, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0},
60
	{"CACHE STATS", 14, 12, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0},
61
	{"", 12, 14, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0},
62
	{"WRITES", 10, 12, 1, FLD_ALIGN_LEFT, -1, 0, 0, 0},
63
	{"", 10, 12, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0},
64
};
65
66
/* _V suffixed fields indicate a value column. */
67
/* Client */
68
#define	FLD_NFS_C_RPC_COUNTS	FIELD_ADDR(fields_nfs,0)
69
#define	FLD_NFS_C_RPC_COUNTS_V	FIELD_ADDR(fields_nfs,1)
70
#define	FLD_NFS_C_RPC_INFO	FIELD_ADDR(fields_nfs,2)
71
#define	FLD_NFS_C_RPC_INFO_V	FIELD_ADDR(fields_nfs,3)
72
#define	FLD_NFS_C_CACHE_INFO	FIELD_ADDR(fields_nfs,4)
73
#define	FLD_NFS_C_CACHE_V	FIELD_ADDR(fields_nfs,5)
74
75
/* Server */
76
#define	FLD_NFS_S_RPC_COUNTS	FIELD_ADDR(fields_nfs,6)
77
#define	FLD_NFS_S_RPC_COUNTS_V	FIELD_ADDR(fields_nfs,7)
78
#define	FLD_NFS_S_CACHE_STATS	FIELD_ADDR(fields_nfs,8)
79
#define	FLD_NFS_S_CACHE_STATS_V	FIELD_ADDR(fields_nfs,9)
80
#define	FLD_NFS_S_WRITES	FIELD_ADDR(fields_nfs,10)
81
#define	FLD_NFS_S_WRITES_V	FIELD_ADDR(fields_nfs,11)
82
83
/* Define views */
84
field_def *view_nfs_0[] = {
85
	FLD_NFS_C_RPC_COUNTS, FLD_NFS_C_RPC_COUNTS_V, FLD_NFS_C_RPC_INFO,
86
	FLD_NFS_C_RPC_INFO_V, FLD_NFS_C_CACHE_INFO, FLD_NFS_C_CACHE_V ,NULL
87
};
88
89
field_def *view_nfs_1[] = {
90
	FLD_NFS_S_RPC_COUNTS, FLD_NFS_S_RPC_COUNTS_V, FLD_NFS_S_CACHE_STATS,
91
	FLD_NFS_S_CACHE_STATS_V, FLD_NFS_S_WRITES, FLD_NFS_S_WRITES_V, NULL
92
};
93
94
/* Define view managers */
95
struct view_manager nfs_client_mgr = {
96
	"Client", select_client, read_nfs, NULL, print_header,
97
	print_client, keyboard_callback, NULL, NULL
98
};
99
100
struct view_manager nfs_server_mgr = {
101
	"Server", select_server, read_nfs, NULL, print_header,
102
	print_server, keyboard_callback, NULL, NULL
103
};
104
105
field_view views_nfs[] = {
106
	{view_nfs_0, "nfsclient", '8', &nfs_client_mgr},
107
	{view_nfs_1, "nfsserver", '9', &nfs_server_mgr},
108
	{NULL, NULL, 0, NULL}
109
};
110
111
int
112
select_client(void)
113
{
114
	num_disp = num_client;
115
	return(0);
116
}
117
118
int
119
select_server(void)
120
{
121
	num_disp = num_server;
122
	return(0);
123
}
124
125
int
126
initnfs(void)
127
{
128
	field_view *v;
129
130
	for (v = views_nfs; v->name != NULL; v++)
131
		add_view(v);
132
133
	read_nfs();
134
135
	return(0);
136
}
137
138
/*
139
 * We get all the information in one go and don't care about
140
 * server or client fields (those will be '0' if not applicable).
141
 */
142
int
143
read_nfs(void)
144
{
145
	struct nfsstats *p = &nfsstats;
146
	int mib[3];
147
	size_t len = sizeof(*p);
148
149
	mib[0] = CTL_VFS;
150
	mib[1] = 2; /* NETDEV */
151
	mib[2] = NFS_NFSSTATS;
152
153
	if (sysctl(mib, 3, p, &len, NULL, 0) < 0)
154
		return(-1);
155
	else
156
		return(0);
157
}
158
159
160
/*
161
 * As we want a view with multiple columns, mixed with labels and values,
162
 * we can't use the regular dance and have to use our own (looong) dance
163
 * to build the layout.
164
 */
165
void
166
print_client(void)
167
{
168
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Getattr");
169
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
170
	  nfsstats.rpccnt[NFSPROC_GETATTR]);
171
	print_fld_str(FLD_NFS_C_RPC_INFO, "TimedOut");
172
	print_fld_ssize(FLD_NFS_C_RPC_INFO_V, nfsstats.rpctimeouts);
173
	print_fld_str(FLD_NFS_C_CACHE_INFO, "Attr Hits  ");
174
	print_fld_ssize(FLD_NFS_C_CACHE_V, nfsstats.attrcache_hits);
175
	end_line();
176
177
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Setattr");
178
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
179
	  nfsstats.rpccnt[NFSPROC_SETATTR]);
180
	print_fld_str(FLD_NFS_C_RPC_INFO, "Invalid");
181
	print_fld_ssize(FLD_NFS_C_RPC_INFO_V, nfsstats.rpcinvalid);
182
	print_fld_str(FLD_NFS_C_CACHE_INFO, "Attr Misses");
183
	print_fld_ssize(FLD_NFS_C_CACHE_V, nfsstats.attrcache_misses);
184
	end_line();
185
186
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Lookup");
187
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
188
	  nfsstats.rpccnt[NFSPROC_LOOKUP]);
189
	print_fld_str(FLD_NFS_C_RPC_INFO, "X Replies");
190
	print_fld_ssize(FLD_NFS_C_RPC_INFO_V, nfsstats.rpcunexpected);
191
	print_fld_str(FLD_NFS_C_CACHE_INFO, "Lkup Hits  ");
192
	print_fld_ssize(FLD_NFS_C_CACHE_V, nfsstats.lookupcache_hits);
193
	end_line();
194
195
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Readlink");
196
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
197
	  nfsstats.rpccnt[NFSPROC_READLINK]);
198
	print_fld_str(FLD_NFS_C_RPC_INFO, "Retries");
199
	print_fld_ssize(FLD_NFS_C_RPC_INFO_V, nfsstats.rpcretries);
200
	print_fld_str(FLD_NFS_C_CACHE_INFO, "Lkup Misses  ");
201
	print_fld_ssize(FLD_NFS_C_CACHE_V, nfsstats.lookupcache_misses);
202
	end_line();
203
204
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Read");
205
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
206
	  nfsstats.rpccnt[NFSPROC_READ]);
207
	print_fld_str(FLD_NFS_C_RPC_INFO, "Requests");
208
	print_fld_ssize(FLD_NFS_C_RPC_INFO_V, nfsstats.rpcrequests);
209
	print_fld_str(FLD_NFS_C_CACHE_INFO, "BioR Hits  ");
210
	print_fld_ssize(FLD_NFS_C_CACHE_V,
211
	  nfsstats.biocache_reads-nfsstats.read_bios);
212
	end_line();
213
214
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Write");
215
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V, nfsstats.rpccnt[NFSPROC_WRITE]);
216
	print_fld_str(FLD_NFS_C_RPC_INFO, "FrcSync");
217
	print_fld_ssize(FLD_NFS_C_RPC_INFO_V, nfsstats.forcedsync);
218
	print_fld_str(FLD_NFS_C_CACHE_INFO, "BioR Misses");
219
	print_fld_ssize(FLD_NFS_C_CACHE_V, nfsstats.read_bios);
220
	end_line();
221
222
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Create");
223
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
224
	  nfsstats.rpccnt[NFSPROC_CREATE]);
225
	print_fld_str(FLD_NFS_C_CACHE_INFO, "BioW Hits  ");
226
	print_fld_ssize(FLD_NFS_C_CACHE_V,
227
	  nfsstats.biocache_writes-nfsstats.write_bios);
228
	end_line();
229
230
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Remove");
231
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
232
	  nfsstats.rpccnt[NFSPROC_REMOVE]);
233
	print_fld_str(FLD_NFS_C_CACHE_INFO, "BioW Misses");
234
	print_fld_ssize(FLD_NFS_C_CACHE_V, nfsstats.write_bios);
235
	end_line();
236
237
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Rename");
238
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
239
	  nfsstats.rpccnt[NFSPROC_RENAME]);
240
	print_fld_str(FLD_NFS_C_CACHE_INFO, "BioRL Hits  ");
241
	print_fld_ssize(FLD_NFS_C_CACHE_V,
242
	  nfsstats.biocache_readlinks-nfsstats.readlink_bios);
243
	end_line();
244
245
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Link");
246
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V, nfsstats.rpccnt[NFSPROC_LINK]);
247
	print_fld_str(FLD_NFS_C_CACHE_INFO, "BioRL Misses");
248
	print_fld_ssize(FLD_NFS_C_CACHE_V, nfsstats.readlink_bios);
249
	end_line();
250
251
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Symlink");
252
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
253
	  nfsstats.rpccnt[NFSPROC_SYMLINK]);
254
	print_fld_str(FLD_NFS_C_CACHE_INFO, "BioD Hits  ");
255
	print_fld_ssize(FLD_NFS_C_CACHE_V,
256
	  nfsstats.biocache_readdirs-nfsstats.readdir_bios);
257
	end_line();
258
259
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Mkdir");
260
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V, nfsstats.rpccnt[NFSPROC_MKDIR]);
261
	print_fld_str(FLD_NFS_C_CACHE_INFO, "BioD Misses");
262
	print_fld_ssize(FLD_NFS_C_CACHE_V, nfsstats.readdir_bios);
263
	end_line();
264
265
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Rmdir");
266
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V, nfsstats.rpccnt[NFSPROC_RMDIR]);
267
	print_fld_str(FLD_NFS_C_CACHE_INFO, "DirE Hits  ");
268
	print_fld_ssize(FLD_NFS_C_CACHE_V, nfsstats.direofcache_hits);
269
	end_line();
270
271
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Readdir");
272
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
273
	  nfsstats.rpccnt[NFSPROC_READDIR]);
274
	print_fld_str(FLD_NFS_C_CACHE_INFO, "DirE Misses");
275
	print_fld_ssize(FLD_NFS_C_CACHE_V, nfsstats.direofcache_misses);
276
	end_line();
277
278
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "RdirPlus");
279
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
280
	  nfsstats.rpccnt[NFSPROC_READDIRPLUS]);
281
	end_line();
282
283
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Access");
284
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
285
	  nfsstats.rpccnt[NFSPROC_ACCESS]);
286
	end_line();
287
288
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Mknod");
289
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V, nfsstats.rpccnt[NFSPROC_MKNOD]);
290
	end_line();
291
292
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Fsstat");
293
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
294
	  nfsstats.rpccnt[NFSPROC_FSSTAT]);
295
	end_line();
296
297
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Fsinfo");
298
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
299
	  nfsstats.rpccnt[NFSPROC_FSINFO]);
300
	end_line();
301
302
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "PathConf");
303
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
304
	  nfsstats.rpccnt[NFSPROC_PATHCONF]);
305
	end_line();
306
307
	print_fld_str(FLD_NFS_C_RPC_COUNTS, "Commit");
308
	print_fld_ssize(FLD_NFS_C_RPC_COUNTS_V,
309
	  nfsstats.rpccnt[NFSPROC_COMMIT]);
310
	end_line();
311
}
312
313
void
314
print_server(void)
315
{
316
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Getattr");
317
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
318
	  nfsstats.srvrpccnt[NFSPROC_GETATTR]);
319
	print_fld_str(FLD_NFS_S_CACHE_STATS, "Inprog");
320
	print_fld_ssize(FLD_NFS_S_CACHE_STATS_V, nfsstats.srvcache_inproghits);
321
	print_fld_str(FLD_NFS_S_WRITES, "WriteOps");
322
	print_fld_ssize(FLD_NFS_S_WRITES_V, nfsstats.srvvop_writes);
323
	end_line();
324
325
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Setattr");
326
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
327
	  nfsstats.srvrpccnt[NFSPROC_SETATTR]);
328
	print_fld_str(FLD_NFS_S_CACHE_STATS, "Idem");
329
	print_fld_ssize(FLD_NFS_S_CACHE_STATS_V,
330
	  nfsstats.srvcache_idemdonehits);
331
	print_fld_str(FLD_NFS_S_WRITES, "WriteRPC");
332
	print_fld_ssize(FLD_NFS_S_WRITES_V, nfsstats.srvrpccnt[NFSPROC_WRITE]);
333
	end_line();
334
335
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Lookup");
336
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
337
	  nfsstats.srvrpccnt[NFSPROC_LOOKUP]);
338
	print_fld_str(FLD_NFS_S_CACHE_STATS, "Non-idem");
339
	print_fld_ssize(FLD_NFS_S_CACHE_STATS_V,
340
	  nfsstats.srvcache_nonidemdonehits);
341
	print_fld_str(FLD_NFS_S_WRITES, "Opsaved");
342
	print_fld_ssize(FLD_NFS_S_WRITES_V,
343
	  nfsstats.srvrpccnt[NFSPROC_WRITE] - nfsstats.srvvop_writes);
344
	end_line();
345
346
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Readlink");
347
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
348
	  nfsstats.srvrpccnt[NFSPROC_READLINK]);
349
	print_fld_str(FLD_NFS_S_CACHE_STATS, "Misses");
350
	print_fld_ssize(FLD_NFS_S_CACHE_STATS_V, nfsstats.srvcache_misses);
351
	end_line();
352
353
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Read");
354
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
355
	  nfsstats.srvrpccnt[NFSPROC_READ]);
356
	end_line();
357
358
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Write");
359
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
360
	  nfsstats.srvrpccnt[NFSPROC_WRITE]);
361
	end_line();
362
363
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Create");
364
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
365
	  nfsstats.srvrpccnt[NFSPROC_CREATE]);
366
	end_line();
367
368
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Remove");
369
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
370
	  nfsstats.srvrpccnt[NFSPROC_REMOVE]);
371
	end_line();
372
373
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Rename");
374
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
375
	  nfsstats.srvrpccnt[NFSPROC_RENAME]);
376
	end_line();
377
378
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Link");
379
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
380
	  nfsstats.srvrpccnt[NFSPROC_LINK]);
381
	end_line();
382
383
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Symlink");
384
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
385
	  nfsstats.srvrpccnt[NFSPROC_SYMLINK]);
386
	end_line();
387
388
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Mkdir");
389
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
390
	  nfsstats.srvrpccnt[NFSPROC_MKDIR]);
391
	end_line();
392
393
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Rmdir");
394
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
395
	  nfsstats.srvrpccnt[NFSPROC_RMDIR]);
396
	end_line();
397
398
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Readdir");
399
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
400
	  nfsstats.srvrpccnt[NFSPROC_READDIR]);
401
	end_line();
402
403
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "RdirPlus");
404
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
405
	  nfsstats.srvrpccnt[NFSPROC_READDIRPLUS]);
406
	end_line();
407
408
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Access");
409
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
410
	  nfsstats.srvrpccnt[NFSPROC_ACCESS]);
411
	end_line();
412
413
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Mknod");
414
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
415
	  nfsstats.srvrpccnt[NFSPROC_MKNOD]);
416
	end_line();
417
418
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Fsstat");
419
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
420
	  nfsstats.srvrpccnt[NFSPROC_FSSTAT]);
421
	end_line();
422
423
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Fsinfo");
424
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
425
	  nfsstats.srvrpccnt[NFSPROC_FSINFO]);
426
	end_line();
427
428
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "PathConf");
429
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
430
	  nfsstats.srvrpccnt[NFSPROC_PATHCONF]);
431
	end_line();
432
433
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Commit");
434
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V,
435
	  nfsstats.srvrpccnt[NFSPROC_COMMIT]);
436
	end_line();
437
438
	/* This creates an empty space on screen to separate the two blocks */
439
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "");
440
	end_line();
441
442
	print_fld_str(FLD_NFS_S_RPC_COUNTS, "Ret-Failed");
443
	print_fld_ssize(FLD_NFS_S_RPC_COUNTS_V, nfsstats.srvrpc_errs);
444
	print_fld_str(FLD_NFS_S_CACHE_STATS, "Faults");
445
	print_fld_ssize(FLD_NFS_S_CACHE_STATS_V, nfsstats.srv_errs);
446
	end_line();
447
}