Section D: Displaying NFS statistics

About displaying NFS statistics

The nfsstat command displays NFS and RPC statistics

The nfsstat command displays statistics about NFS and Remote Procedure Calls (RPCs) for the filer. You can use the output of this command to find performance bottlenecks or inefficiencies in your NFS setup.


Note: A full description of the meaning of NFS statistics is outside the scope of this guide. A good source of information about this topic is Managing NFS and NIS by Hal Stern, O'Reilly & Associates, Inc.


Syntax

The syntax of the nfsstat command is as follows:

nfsstat [ interval ] | [ -h [ ip_address | host_name ] ] | [ -l ] | 
[ -z ]
nfsstat -h [ ip_address | host_name ]
nfsstat -l
nfsstat -z

Options

The following table describes the options for the nfsstat command.

Option Description
none When no options are specified, the command displays statistical information since the last time the filer was rebooted.
interval When an interval is specified, the command displays statistics continually. The interval specifies the number of seconds the command waits between updates.
-h Displays statistics for a single client. You must provide the client's host name or IP address as an argument to the -h option.
  • To use the -h option, you must enable the nfs.per_client_stats.enable option by entering the following command:
    options nfs.per_client_stats.enable on
    
  • Enable the per-client statistics collection mode as soon as possible after you start the filer or reset the counters with nfsstat -z. Otherwise, nfsstat -l reports incorrectly low percentages and displays statistics that include clients that have generated RPC calls but no NFS calls to the client.
-l Displays statistics that have been collected for all NFS clients.
-z Resets the statistics counters.

Example: no options

The following lines show the output of the nfsstat command when you specify no options:

nfsstat
Server rpc:
TCP:
calls      badcalls   nullrecv   badlen     xdrcall    
0          0          0          0          0          

 
UDP:
calls      badcalls   nullrecv   badlen     xdrcall    
24         0          0          0          0          

 
Server nfs:
calls      badcalls
24         0          

 
Server nfs V2: (24 calls)
null     getattr   setattr  root      lookup  readlink   read       
0 0%     5 21%     0 0%     0 0%       16 67%  0 0%       0 0%       
wrcache  write    create   remove    rename  link       symlink    
0 0%     0 0%     0 0%     0 0%      0 0%    0 0%       0 0%       
mkdir    rmdir    readdir  statfs     
0 0%     0 0%     3 13%    0 0%       

 
Server nfs V3: (0 calls)
null     getattr   setattr  root      lookup  readlink   read       
0 0%     0 0%      0 0%    0 0%      0 0%    0 0%       0 0%       
write    create   mkdir    symlink    mknod  remove     rmdir      
0 0%     0 0%     0 0%     0 0%       0 0%   0 0%       0 0%       
rename   link     readdir  readdir+  fsstat  fsinfo    pathconf   
0 0%     0 0%     0 0%       0 0%       0 0%   0 0%       0 0%       
commit 
0 0% 

Example: using the -l option

The following lines show the output of the nfsstat command when you specify the -l option:

nfsstat -l
172.17.25.13  sherlock   NFSOPS =     2943506 (90%)
172.17.25.16  watson     NFSOPS =     3553686 ( 2%)
172.17.25.18  hudson     NFSOPS =     2738083 ( 1%)
172.17.230.7  conan      NFSOPS =     673247l ( 3%)
172.17.230.8  baker      NFSOPS =   202614527 ( 1%)
172.17.230.9  moriarty   NFSOPS =     1006881 ( 0%)
175.17.230.10 doyle      NFSOPS =        1185 ( 0%)

Example: using the -h option

The following lines show the output of the nfsstat command when you specify the -h option with a host name:

nfsstat -h eng_host
Client: 172.17.25.3 (eng_host)  -------------------------------
Server rpc:
calls   badcalls nullrecv badlen  xdrcall
33374   0        0        0       0

 
Server nfs:
calls   badcalls
33345   0

 
Server nfs V2:
null    getattr  setattr  root     lookup     readlink  read
0 0%    8410 25% 19 0%    0 0%     13687 41%  42 0%     489 22%
wrcache write    create   remove   rename     link      symlink
0 0%    3225 10% 12 0%    7 0%     9 0%       0 0%      0 0%
mkdir   rmdir    readdir  statfs
0 0%    0 0%     416 1%   29 0%

 
Server nfs V3:
null    getattr  setattr  lookup   access     readlink  read
0 0%    0 0%     0 0%     0 0%     0 0%       0 0%      0 0%
write   create   mkdir    symlink  mknod      remove    rmdir
0 0%    0 0%     0 0%     0 0%     0 0%       0 0%      0 0%
rename  link     readdir  readdir+ fsstat     fsinfo    pathconf
0 0%    0 0%     0 0%     0 0%     0 0%       0 0%      0 0%
commit
0 0%

Example: resetting counters with the -z option

The following command resets the counters:

nfsstat -z

Related information

The following table lists additional information that you might find helpful.

To learn about... Read...
How the Network Appliance custom Management Information Base (MIB) provides the same information as the nfsstat command through SNMP "About the Network Appliance custom MIB."
About the nfsstat command The na_nfsstat(1) man page.

Copyright © 1999, Network Appliance, Inc. All rights reserved.

Part No. 210-02334
File: nfs17.htm
Last updated: 04/26/99 08:11:30