Viewing NFS client operations

While reading through the NFS RFCs this week, I decided to write nfsclientstats.pl to view NFS operations by process:

$ nfsclientstats.pl

process    read write readdir getattr setattr lookup access create remove rename mkdir rmdir
mkdir         0     0       0     380       0    190      0      0      0      0   190     0
mv            0     0       0     189       0   1890   2079      0      0    189     0     0
orca       3328   194       0    5496       6   6882   8246     12      0      0     0     0
rm            0     0     760     950       0   2850   5320      0    190      0     0   190
touch         0     0       0     378     189   1512   1323    189      0      0     0     0

process    read write readdir getattr setattr lookup access create remove rename mkdir rmdir
mkdir         0     0       0     386       0    193      0      0      0      0   193     0
mv            0     0       0     195       0   1950   2145      0      0    195     0     0
orca       3110   169       0    8312      22  10434  12476     44      0      0     0     0
rm            0     0     780     975       0   2925   5460      0    195      0     0   195
touch         0     0       0     388     194   1552   1358    194      0      0     0     0

The script uses the DTrace FBT provider, and produces output that is greater than 80-characters. If you are an 80-column purist, you might want to refrain from downloading the script. ;) Hope folks find this useful!

Leave a Reply

Your email address will not be published. Required fields are marked *