使用 fsstat 实用程序可以按文件系统类型和按挂载点监视文件系统操作。可以使用各种选项定制输出:
显示有关挂载点的 I/O 操作的统计信息
显示有关挂载点的命名操作的统计信息
以下示例显示了 NFS 版本 3、NFS 版本 4 和 root 挂载点的输出。
% fsstat nfs3 nfs4 / new name name attr attr lookup rddir read read write write file remov chng get set ops ops ops bytes ops bytes 3.81K 90 3.65K 5.89M 11.9K 35.5M 26.6K 109K 118M 35.0K 8.16G nfs3 759 503 457 93.6K 1.44K 454K 8.82K 65.4K 827M 292 223K nfs4 25.2K 18.1K 1.12K 54.7M 1017 259M 1.76M 22.4M 20.1G 1.43M 3.77G /
以下示例使用 –i 选项提供有关 NFS 版本 3、NFS 版本 4 和 root 挂载点的 I/O 操作的统计信息。
% fsstat -i nfs3 nfs4 / read read write write rddir rddir rwlock rwulock ops bytes ops bytes ops bytes ops ops 109K 118M 35.0K 8.16G 26.6K 4.45M 170K 170K nfs3 65.4K 827M 292 223K 8.82K 2.62M 74.1K 74.1K nfs4 22.4M 20.1G 1.43M 3.77G 1.76M 3.29G 25.5M 25.5M /
以下示例使用 –n 选项提供有关 NFS 版本 3、NFS 版本 4 和 root 挂载点的命名操作的统计信息。
% fsstat -n nfs3 nfs4 / lookup creat remov link renam mkdir rmdir rddir symlnk rdlnk 35.5M 3.79K 90 2 3.64K 5 0 26.6K 11 136K nfs3 454K 403 503 0 101 0 0 8.82K 356 1.20K nfs4 259M 25.2K 18.1K 114 1017 10 2 1.76M 12 8.23M /
有关更多信息,请参见 fsstat(1M) 手册页。