System Administration Guide: Network Services

How to Display NFS Server and Client Statistics

The NFS distributed file service uses a remote procedure call (RPC) facility that translates local commands into requests for the remote host. The remote procedure calls are synchronous. The client application is blocked or suspended until the server has completed the call and has returned the results. One of the major factors that affects NFS performance is the retransmission rate.

If the file server cannot respond to a client's request, the client retransmits the request a specified number of times before the client quits. Each retransmission imposes system overhead and increases network traffic. Excessive retransmissions can cause network performance problems. If the retransmission rate is high, you could look for the following:

Table 30–3 describes the nfsstat options to display client and server statistics.

Table 30–3 Commands for Displaying Client/Server Statistics



nfsstat -c

Client statistics 

nfsstat -s

Server statistics 

netstat -m

Network statistics for each file system 

Use nfsstat -c to show client statistics, and nfsstat -s to show server statistics. Use netstat -m to display network statistics for each file system. For more information, see nfsstat(1M).

Examples–Displaying NFS Server and Client Statistics

The following example displays RPC and NFS data for the client pluto.

$ nfsstat -c

Client rpc:
Connection oriented:
calls    badcalls  badxids  timeouts newcreds  badverfs   timers     
1595799  1511      59       297      0         0          0          
cantconn nomem     interrupts 
1198      0         7          
calls    badcalls  retrans  badxids  timeouts  newcreds   badverfs   
80785    3135      25029    193      9543      0          0          
timers   nomem     cantsend   
17399    0         0          

Client nfs:
calls    badcalls  clgets   cltoomany  
1640097  3112      1640097  0          
Version 2: (46366 calls)
null     getattr   setattr  root     lookup     readlink  read       
0 0%     6589 14%  2202 4%  0 0%     11506 24%  0 0%      7654 16%   
wrcache  write     create   remove   rename     link      symlink    
0 0%     13297 28% 1081 2%  0 0%     0 0%       0 0%      0 0%       
mkdir    rmdir     readdir  statfs     
24 0%    0 0%      906 1%   3107 6%    
Version 3: (1585571 calls)
null    getattr    setattr  lookup     access     readlink  read     
0 0%    508406 32% 10209 0% 263441 16% 400845 25% 3065 0%  117959 7%
write    create     mkdir    symlink    mknod    remove   rmdir 
69201 4% 7615 0%    42 0%    16 0%      0 0%     7875 0%  51 0%      
rename   link       readdir  readdir+   fsstat   fsinfo   pathconf   
929 0%   597 0%     3986 0%  185145 11% 942 0%   300 0%   583 0%     
4364 0%    
Client nfs_acl:
Version 2: (3105 calls)
null       getacl     setacl     getattr    access     
0 0%       0 0%       0 0%       3105 100%  0 0%       
Version 3: (5055 calls)
null       getacl     setacl     
0 0%       5055 100%  0 0%    

The output of the nfsstat -c command is described in Table 30–4.

Table 30–4 Output From the nfsstat -c Command




The total number of calls that were sent. 


The total number of calls that were rejected by RPC. 


The total number of retransmissions. For this client, the number of retransmissions is less than 1 percent, or approximately 10 timeouts out of 6888 calls. These retransmissions might be caused by temporary failures. Higher rates might indicate a problem. 


The number of times that a duplicate acknowledgment was received for a single NFS request. 


The number of calls that timed out. 


The number of times a call had to wait because no client handle was available. 


The number of times the authentication information had to be refreshed. 


The number of times the time-out value was greater than or equal to the specified time-out value for a call. 


The number of times a read was made to a symbolic link. If this number is high, at over 10 percent, then there could be too many symbolic links.

The following example shows output from the nfsstat -m command.

pluto$ nfsstat -m
/usr/man from pluto:/export/svr4/man
Flags: vers=2,proto=udp,auth=unix,hard,intr,dynamic,
        rsize=8192, wsize=8192,retrans=5
 Lookups: srtt=13 (32ms), dev=10 (50ms), cur=6 (120ms)
 All:     srtt=13 (32ms), dev=10 (50ms), cur=6 (120ms)

This output of the nfsstat -m command, which is displayed in milliseconds, is described in Table 30–5.

Table 30–5 Output From the nfsstat -m Command




The smoothed average of the round-trip times 


The average deviations 


The current “expected” response time 

If you suspect that the hardware components of your network are creating problems, you need to look closely at the cabling and connectors.