There are a few different ways to track NFS (Network File System) directory and disk I/O stats on Linux. Here are a few options:
iostat: This command is part of the sysstat package, which is often installed by default on many Linux distributions. It can be used to monitor disk I/O stats for all disks and partitions, including those mounted via NFS.$ iostat -xd 1
The -x option enables extended statistics, and the -d option displays only disk stats. The 1 specifies the interval at which the stats should be displayed, in seconds.
nfsiostat: This command is part of the nfs-utils package, and can be used to monitor NFS I/O stats specifically.$ nfsiostat -c 1
The -c option specifies the interval at which the stats should be displayed, in seconds.
nfsstat: This command is also part of the nfs-utils package, and can be used to display NFS client and server statistics.$ nfsstat -c
The -c option displays cumulative stats since the system was booted.
sar: This command is part of the sysstat package, and can be used to monitor a variety of system stats, including disk I/O stats.$ sar -d 1
The -d option displays disk I/O stats, and the 1 specifies the interval at which the stats should be displayed, in seconds.
These are just a few examples of the tools available for monitoring NFS and disk I/O stats on Linux. There are many other options available, including third-party tools such as iotop and dstat.