xref: /freebsd/usr.bin/nfsstat/nfsstat.1 (revision 62a52c15422470f97fc7b311d89c83f910bcc1b1)
1.\" Copyright (c) 1989, 1990, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. Neither the name of the University nor the names of its contributors
13.\"    may be used to endorse or promote products derived from this software
14.\"    without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.Dd December 28, 2023
29.Dt NFSSTAT 1
30.Os
31.Sh NAME
32.Nm nfsstat
33.Nd display
34.Tn NFS
35statistics
36.Sh SYNOPSIS
37.Nm
38.Op Fl -libxo
39.Op Fl cdEemqszW
40.Op Fl w Ar wait
41.Sh DESCRIPTION
42The
43.Nm
44command displays statistics kept about
45.Tn NFS
46client and server activity.
47For the NFSv4 server, the statistics are for operations within the Compound
48RPCs and not the count of RPCs.
49If you wish to compare RPC counts between NFSv3 and NFSv4, you must use
50statistics in the client(s).
51.Pp
52The options are as follows:
53.Bl -tag -width "-w wait"
54.It Fl c
55Only display client side statistics.
56.It Fl d
57Display statistics for the NFS server that are similar to those
58displayed by
59.Xr iostat 8 .
60This includes kilobytes per transfer, transfers per second, and megabytes per
61second for read, write, and all operations.
62It also includes the current queue depth, the busy percentage, and latency
63for all operations.
64If the
65.Fl W
66flag is added, commits per second, commit latency, read latency, and write
67latency are also added to the display.
68The busy percentage shown can exceed 100 at times.
69This is because of the way busy percentages are calculated.
70The busy time is calculated by adding the elapsed time between the
71last time an operation started or finished,
72and the current time.
73If there is only one operation outstanding, the "busy time" time
74will get updated with the total time of that operation.
75That means that the difference in the busy time between the two
76measurement intervals (often 1 second)
77will increase by more than the measurement interval.
78.It Fl e
79Report the extra statistics collected by the NFS client and
80server for NFSv4.
81.It Fl E
82Similar to
83.Fl e
84except that the statistics include NFSv4.1 and NFSv4.2 and the numbers aren't
85clipped at one billion.
86Only one of
87.Fl e
88or
89.Fl E
90can be specified.
91.It Fl M
92Deprecated and ignored.
93.It Fl m
94Report the mount options for all NFS client mounts.
95This option overrides all others and
96.Nm
97will exit after completing the report.
98.It Fl N
99Deprecated and ignored.
100.It Fl s
101Only display server side statistics.
102.It Fl W
103Use wide format with interval short summary.
104This option is especially
105useful when combined with
106.Fl c ,
107.Fl d ,
108or
109.Fl s
110and a time delay.
111.It Fl w Ar wait
112Display a shorter summary of
113.Tn NFS
114activity for both the client and server at
115.Ar wait
116second intervals.
117.It Fl z
118Reset statistics after displaying them.
119.It Fl q
120Do not print headers.
121.It Fl -libxo
122Generate output via
123.Xr libxo 3
124in a selection of different human and machine readable formats.
125See
126.Xr xo_parse_args 3
127for details on command line arguments.
128.El
129.Sh SEE ALSO
130.Xr fstat 1 ,
131.Xr netstat 1 ,
132.Xr ps 1 ,
133.Xr systat 1 ,
134.Xr sysctl 3 ,
135.Xr iostat 8 ,
136.Xr nfsdumpstate 8 ,
137.Xr pstat 8 ,
138.Xr vmstat 8
139.Sh HISTORY
140The
141.Nm
142command appeared in
143.Bx 4.4 .
144