nfsstat(8nfs)
Name
nfsstat − display Network File System (NFS) statistics
Syntax
/usr/etc/nfsstat [ −cnrsz ] [ vmunix.n ] [ core.n ]
Description
The nfsstat command displays statistical information about the Network File System (NFS) and Remote Procedure Call (RPC) interfaces in the kernel. It can also be used to reinitialize this information. If you do not specify any options, nfsstat displays the information as though all the options were specified, but −z.
The statistics are reinitialized to zero each time the system reboots.
Options
−c Display the client information. The client side NFS and RPC information is displayed. You can combine this option with the −n and −r options to print client NFS or client RPC information only.
−s Display the server information. The server side NFS and RPC information is displayed.
−n Display the NFS information. The NFS information for both the client and server side is displayed. You can combine this option with the −c and −s options to print client or server NFS information only.
−r Display the RPC information. The RPC information for both the client and server side is displayed. You can combine the −r option with the −c and −s options to print client or server RPC information only.
−z Reinitialize the statistics to zero. You can combine this option with any of the above options to reset particular sets of statistics to zero after printing them. You must have write permission on /dev/kmem to use this option.
core.n This is the core image, which is usually stored in the directory /usr/adm/crash. If no core is specified, the default is /dev/mem.
vmunix.n This is the kernel image, which is usually stored in the directory /usr/adm/crash. If no vmunix is specified, the default is /vmunix.
Here is a sample of nfsstat output with no options specified:
# nfsstat
Server rpc:
calls badcalls nullrecv badlen xdrcall
1312142 0 0 0 0
Server nfs:
calls badcalls
1312142 0
null getattr setattr root lookup readlink read
0 0% 319612 24% 1220 0% 0 0% 795544 60% 5857 0% 163962 12%
wrcache write create remove rename link symlink
0 0% 7294 0% 165 0% 239 0% 75 0% 74 0% 0 0%
mkdir rmdir readdir fsstat
0 0% 0 0% 17612 1% 334 0%
Client rpc:
calls badcalls retrans badxid timeout wait newcred
30156 40 256 0 296 0 0
Client nfs:
calls badcalls nclget nclsleep
30143 40 30156 0
null getattr setattr root lookup readlink read
0 0% 5833 19% 21 0% 0 0% 17630 58% 420 1% 3455 11%
wrcache write create remove rename link symlink
0 0% 475 1% 84 0% 10 0% 4 0% 0 0% 0 0%
mkdir rmdir readdir fsstat
2 0% 0 0% 1423 4% 786 2%
Of the client RPC statistics, each field is as follows:
callsThe total number of client RPC calls successfully begun.
badcallsThe total number of unsuccessful (badly formed) RPC calls.
retransThe number of times that RPC calls were transmitted.
badxidThe number of times a reply transaction ID did not match the request transaction ID.
timeoutThe number of times a request was made but not answered.
waitThe number of times the client system had to sleep because the client structure was busy.
newcredThis field is never used, and is therefore always 0.
Of the client NFS statistics, each field is as follows:
callsThe total number of client NFS calls successfully begun.
badcallsThe total number of unsuccessful (badly formed) NFS calls.
nclgetThe number of times a client structure was successfully acquired. The client structure is where clients keep track of an outstanding RPC call.
nclsleepThe number of times all client structures were busy. Since there are six client structures, nclsleep is the number of times that there were six operations in progress when a seventh one arrived and had to wait until one of the client structures was freed.
Of the server RPC statistics, each field is as follows:
callsThe total number of RPC calls received by NFS daemons.
badcallsThe number of badly formed RPC calls.
nullrecvThe number of empty RPC calls.
badlenThe number of RPC calls with too small of a body.
xdrcallThe number of RPC calls that failed to decode in XDR.
Of the server NFS statistics, each field is as follows:
callsThe total number of NFS calls dispatched by an NFS daemon.
badcallsThe number of badly formed NFS requests.
The remaining fields provide counts of the completed NFS operations. Here are their descriptions:
nullThis is the number of null operations. If the software is working properly, this field should be zero.
getattrThis is the number of file attributes that were retrieved. In the example above, there were 319,612, or 24% on the server.
setattrThis is the number of file attributes that were stored.
rootThis field is not used and should always be zero.
lookupThis is the number of times that a directory pathname was looked up.
readlinkThis is the number of times a symbolic link was read.
readThis is the number of times data was read from a file.
wrcacheThis field is not used and should always be zero.
writeThis is the number of times data was written to a file.
createThis is the number of times a new file was created.
removeThis is the number of times a file was removed.
renameThis is the number of times a file was renamed.
linkThis is the number of times a hard link was created.
symlinkThis is the number of times a symbolic link was created.
mkdirThis is the number of times a directory was created.
rmdirThis is the number of times a directory was removed.
readdirThis is the number of times a directory was read.
fsstatThis is the number of times that file system attributes and statistics were retrieved.
Files
/vmunix System namelist
/dev/kmem kernel memory