nfsstat: Add libxo output

Add libxo output support
Merge exp41_intpr and exp_intpr function. The only difference is to print
NFSV4.1 operations in exp41, add a third arguement to control that.
printtitle was set to 1 and don't have a switch, add a -q options to control it.

Reviewed by:	bapt
Sponsored by:	Gandi.net
Differential Revision:	https://reviews.freebsd.org/D14012
This commit is contained in:
manu 2018-01-30 09:59:52 +00:00
parent 6c722cc3aa
commit 9a1d45c825
3 changed files with 479 additions and 597 deletions

View File

@ -4,6 +4,6 @@
PROG= nfsstat PROG= nfsstat
CFLAGS+=-DNFS CFLAGS+=-DNFS
LIBADD+= devstat LIBADD+= devstat xo
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -28,7 +28,7 @@
.\" From: @(#)nfsstat.1 8.1 (Berkeley) 6/6/93 .\" From: @(#)nfsstat.1 8.1 (Berkeley) 6/6/93
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd November 23, 2016 .Dd January 22, 2018
.Dt NFSSTAT 1 .Dt NFSSTAT 1
.Os .Os
.Sh NAME .Sh NAME
@ -38,6 +38,7 @@
statistics statistics
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl -libxo
.Op Fl cdEemszW .Op Fl cdEemszW
.Op Fl M Ar core .Op Fl M Ar core
.Op Fl N Ar system .Op Fl N Ar system
@ -124,6 +125,15 @@ activity for both the client and server at
second intervals. second intervals.
.It Fl z .It Fl z
Reset statistics after displaying them. Reset statistics after displaying them.
.It Fl q
Do not print header
.It Fl -libxo
Generate output via
.Xr libxo 3
in a selection of different human and machine readable formats.
See
.Xr xo_parse_args 3
for details on command line arguments.
.El .El
.Sh FILES .Sh FILES
.Bl -tag -width ".Pa /boot/kernel/kernel" -compact .Bl -tag -width ".Pa /boot/kernel/kernel" -compact

File diff suppressed because it is too large Load Diff