5

I have a linux file server running CentOS 6. Files are accessed via NFS4.

Sometimes I have problems with disk io load. I want to find out what is causing them.

I can find out which client is causing them with tcpdump and nfsiostat (on the clients). But I want to know either which files are accessed or which process is doing the accesses. Then I can think about a solution for it.

I have tried to use wireshark to decode the accesses, but it is hard to read when open and read/write are not close together or you have lots of files with similar names (directories are not shown, just dir handles). If you have a lot of activity it would be nice to have a way to sort files by activity to find out what is the culprit.

Does anybody know of a solution for this?

Gerd
  • 51
  • 1
  • 2

3 Answers3

3

You can use either lsof or ftop (the last one is on EPEL repo)

For example:

lsof -N /mnt/nfs/*

HTH

sebelk
  • 682
  • 4
  • 13
  • 32
0

NFSv4 open files and leases can be seen from file /proc/fs/nfsd/clients/CLIENT_ID/states, for example by running:

grep . /proc/fs/nfsd/clients/*/states

NFSv3 and older clients seem to be not included unfortunately.

Zouppen
  • 111
  • 5
-1

A good start is to use/install iotop, i find it very handy for similar problems.