12

I have a NFS mounted directory, and I'd like to monitor the I/O usage on it (MB/s reads and writes). What's the recommended way to do that ?

This is the NFS client, I don't have access to the NFS server. I'm not interested in general I/O usage (otherwise I would use vmstat/iostat). It also has multiple NFS mounts, I'm interested in monitoring just one specific mount (or I might have used ethereal).

Thanks!

5

iostat -mnh really is the best way to do this. It only combines stats for the same remote device. If your nfs mounts are from separate remote endpoints, then it wont combine them.

The -m means display in MB/s, the -n means to display stats for NFS shares, -h means human friendlier output.

If you pass it a number after like iostat -mnh 3 it'll display stats per every 3 seconds.

4
  • 1
    iostat doesn't accept the -m option on my system. – Good Person Feb 3 '11 at 2:16
  • -m might be a gnu option then – phemmer Feb 3 '11 at 2:46
  • I've found iostat to be a poor choice for obtaining IO data over short intervals because my implementation (sysstat-7.0.2-3.e15) only ever shows wBlk_svr/s as a rate since boot time. I like to think that newer versions can show this as a counter instead. – ericslaw Jul 14 '11 at 23:15
  • 4
    What platform are we talking about? Iostat is platform dependent. The -n (network filesystem) option was deprecated in Linux iostat. It's gone in the version I see (RHEL 7.2) – John M Aug 24 '16 at 15:50
15

nfsiostat (aka nfs-iostat.py) from nfs-utils is good for interactive monitoring. For historical data since a filesystem was mounted, use mountstats. Both of these tools read data from /proc/self/mountstats.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.