History log of /freebsd-11-stable/usr.bin/nfsstat/nfsstat.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 321000 14-Jul-2017 rmacklem

MFC: r320323
Add RPC count reporting for the two new RPCs added by r320322.


# 309831 10-Dec-2016 rmacklem

MFC: r309197
Add a -E flag to nfsstat.c so that it prints out the NFSv4.1
procedure/operation counts.
It also avoids clipping the counts at 9 digits.


# 306632 03-Oct-2016 rmacklem

MFC: r304058, r304066, r304194
Update nfsstat.c to use the new kernel nfsstat structure and
add the new "-d" flag from D1626.
The man page will be updated in a subsequent commit.


# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 292686 24-Dec-2015 bapt

Since removal of oldnfs support linking to kvm is not needed anymore


# 281922 24-Apr-2015 trasz

Make nfsstat(1) build with WARNS=6.

Sponsored by: The FreeBSD Foundation


# 281888 23-Apr-2015 trasz

Remove oldnfs support from nfsstat(1).

Reviewed by: rmacklem@ (earlier version)
Sponsored by: The FreeBSD Foundation


# 281691 18-Apr-2015 trasz

Remove some oldnfs remnants.

Differential Revision: https://reviews.freebsd.org/D2287
Reviewed by: rmacklem@
Sponsored by: The FreeBSD Foundation


# 261514 05-Feb-2014 jhb

Use the DELTA() macro to tidy the server-side interval stats code a bit.

MFC after: 2 weeks


# 261512 05-Feb-2014 jhb

Partially revert r52493 and change client side interval statistics to
report the actual number of RPCs issued, not the theoretical number
that would be issued if all caching was disabled.

Reviewed by: rmacklem
MFC after: 2 weeks


# 251585 09-Jun-2013 rmacklem

Modify nfsstat.c so that it prints out an error when a non-root
user attempts to use the "-m" option and it fails.

Requested by: danny@cs.huji.ac.il
MFC after: 2 weeks


# 243783 01-Dec-2012 rmacklem

Add a "-m" option to nfsstat, which dumps out the
actual options used by all NFS mounts. Works for
the new/default NFS client only.

Reviewed by: alfred
MFC after: 2 weeks


# 238701 22-Jul-2012 hrs

Fix a bug which prevents "nfsstat -W" for server statistics from working.


# 225113 23-Aug-2011 rmacklem

Fix nfsstat(1) so that it prints out correct stats for the
new NFS server when the "-e" option is not used. The bug was
that srvrpccnt[] was being indexed by NFSPROC_XXX when it needs
to be indexed by NFSV4OP_XXX.

Tested by: hrs
Approved by: re (bz)


# 225109 23-Aug-2011 rmacklem

Fix nfsstat(1) so that it prints out correct stats for the
new NFS server when the "-w" option is used. The problem was
spotted by hrs@ during testing where srvrpcnt[] must be indexed
by NFSV4OP_XXX and not NFSPROC_XXX.

Submitted by: hrs
Approved by: re (bz)
MFC after: 2 weeks


# 221973 15-May-2011 rmacklem

Change the sysctl naming for the old and new NFS clients
to vfs.oldnfs.xxx and vfs.nfs.xxx respectively. This makes
the default nfs client use vfs.nfs.xxx after r221124.


# 221492 05-May-2011 ru

- Add a forgotten -o to usage().
- Sync usage() with manpage's SYNOPSIS.


# 221455 04-May-2011 rmacklem

Modify nfsstat(1) so that it reports statistics for the
new NFS client/server by default, in a format compatible
with the old NFS client/server. Also add a "-o" flag that
forces nfsstat(1) to get statistics for the old NFS
client/server.


# 221454 04-May-2011 rmacklem

Modify nfsstat(1) so that it prints out the buffer cache
stats in the same way for the new client as the old one.

MFC after: 2 weeks


# 221440 04-May-2011 rmacklem

Fix nfsstat.c so that the "-z" option works for the new
NFS subsystem.

MFC after: 2 weeks


# 221435 04-May-2011 rmacklem

Revert r221308, since it incorrectly zero'd both client and
server stats when "-c" or "-s" was specified.


# 221308 01-May-2011 rmacklem

Fix nfsstat so that the "-z" option works for the
new NFS subsystem.

MFC after: 2 weeks


# 220596 13-Apr-2011 ru

Show client's access cache statistics.


# 216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# 200462 13-Dec-2009 delphij

Revert most part of 200420 as requested, as more review and polish is
needed.


# 200420 11-Dec-2009 delphij

Remove unneeded header includes from usr.bin/ except contributed code.

Tested with: make universe


# 194880 24-Jun-2009 dfr

Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementation
and will be removed.


# 194792 23-Jun-2009 delphij

Use C99 initialization when necessary; apply static to internal rountines.
This makes nfsstat WARNS=3 clean.


# 194190 14-Jun-2009 ed

Include <sys/module.h> for modfind().

Submitted by: Pawel Worach


# 193258 01-Jun-2009 rmacklem

Change the "-4" option flag to "-e" since it does not refer to IPv4
and to make it consistent with the flag used by nfsd and mountd.

Approved by: kib (mentor)


# 192762 25-May-2009 rmacklem

Add the "-4" option to nfsstat, so that it will reports stats
for the experimental nfs subsystem when that option is specified.

Approved by: kib (mentor)


# 172759 18-Oct-2007 jhb

Add a -z flag to nfsstat which zeros the NFS statistics after displaying
them.

MFC after: 1 week
Requested by: ps
Submitted by: ps (6 years ago)


# 131990 11-Jul-2004 stefanf

Fix a few cases that relied on 'implicit int' (constraint violation in C99).


# 92921 21-Mar-2002 imp

remove __P


# 83653 18-Sep-2001 peter

Userland part of nfs client/server split and cleanup.


# 77207 25-May-2001 tmm

Fix the error buffer passed to kvm_openfiles to have a correct length
of _POSIX2_LINE_MAX.

MFC after: 3 days


# 74655 22-Mar-2001 tmm

Take setgid kmem away from nfsstat, it has not needed it for some time
now.

Approved by: rwatson


# 65428 04-Sep-2000 imp

getopt and friends are declared in <unistd.h>
getopt returns -1 not EOF.


# 54674 16-Dec-1999 obrien

Options added in rev 1.14 were not documented in usage().


# 52493 25-Oct-1999 dillon

Add -c, -s, and -W options to nfsstat. Improve interval output and add
wide-format option to get client-side ops and cache statistics on a single
line.

Change client side ops to the number of attempted ops, whether cached or
not, rather then just the number of rpc's that went through to the server.
This brings nfsstat inline with systat -vm and vmstat and reduces
confusion. The combined cache percentage stats now available via
'nfsstat -cW 1' becomes very useful.


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 40638 25-Oct-1998 bde

Backout out previous commit. The bug was in the kernel.


# 40627 24-Oct-1998 msmith

Use sysctlbyname() to locate the vfs.nfs.nfsstats node.
Submitted by: Daniel Rock <rock@cs.uni-sb.de>


# 32649 20-Jan-1998 bde

Merged from Lite2. This was mostly already done, mostly indirectly
via wollman's changes in rev.1.2 being adopted by Lite2 and the
nfsv3 changes in rev.1.3 being adopted by both FreeBSD and Lite2.
We were only missing lookup of the type number for nfs (MOUNT_NFS
doesn't exist in Lite2).


# 24360 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# 23012 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 14516 11-Mar-1996 hsu

From Lite2: rename fs to vfs.


# 11936 30-Oct-1995 phk

<sys/user.h> -> <sys/time.h>

Spotted by: bde


# 11914 29-Oct-1995 phk

#include <sys/user.h>


# 9336 27-Jun-1995 dfr

Changes to support version 3 of the NFS protocol.
The version 2 support has been tested (client+server) against FreeBSD-2.0,
IRIX 5.3 and FreeBSD-current (using a loopback mount). The version 2 support
is stable AFAIK.
The version 3 support has been tested with a loopback mount and minimally
against an IRIX 5.3 server. It needs more testing and may have problems.
I have patched amd to support the new variable length filehandles although
it will still only use version 2 of the protocol.

Before booting a kernel with these changes, nfs clients will need to at least
build and install /usr/sbin/mount_nfs. Servers will need to build and
install /usr/sbin/mountd.

NFS diskless support is untested.

Obtained from: Rick Macklem <rick@snowhite.cis.uoguelph.ca>


# 3819 23-Oct-1994 wollman

Use new NFS sysctl interface to get statistics rather than reading /dev/kmem,
unless the user specifies a dead kernel to operate on.


# 1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.


# 1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources