I'd like to retrieve the total number of kilobytes read/written for each NFS mount point.

Using the following commands, I'm able to see the current throughput for each NFS mount point in kB/S.

iostat -nk



Is there a way to tell iostat or nfsiostat to return the total number of kilobytes since boot?

(Much like the last two columns of iostat -k)

Device:    tps    kB/read/s    kB/wrtn/s    kB_read    kB_wrtn
sda        17.69  234.75       30.82        2760421    362433
  • What OS are you using? My iostat from the Linux systat package shows the stats since boot by default.
    – rudimeier
    Jun 29, 2016 at 10:59
  • Centos, do your NFS stats appear in x per second? Or do you have total bytes since boot?
    – Fidel
    Jun 29, 2016 at 18:09
  • The output of a plain iostat command looks like yours. It shows kb written per second (measured since boot) and absolut kb written since boot. Using iostat -d 5 2 would print two reports. The first one is again the "since boot" report. The second one for the next "5 seconds report".
    – rudimeier
    Jun 30, 2016 at 14:51

1 Answer 1


By assuming you use Linux client, you can use mountstats command, which prints statistics per mount point:

$ mountstats /mnt
Stats for xxxx:/ mounted on /mnt:
  NFS mount options: rw,vers=4.1,rsize=32768,wsize=32768,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=a.b.c.d,local_lock=none
  NFS server capabilities: caps=0x3ffdf,wtmult=512,dtsize=32768,bsize=0,namlen=255
  NFSv4 capability flags: bm0=0xfcffbfff,bm1=0x40fdbe3e,bm2=0x800,acl=0x3,sessions,pnfs=LAYOUT_NFSV4_1_FILES
  NFS security flavor: 1  pseudoflavor: 0

NFS byte counts:
  applications read 602253119 bytes via read(2)
  applications wrote 1750 bytes via write(2)
  applications read 0 bytes via O_DIRECT read(2)
  applications wrote 0 bytes via O_DIRECT write(2)
  client read 552781120 bytes via NFS READ
  client wrote 1750 bytes via NFS WRITE

RPC statistics:
  634086 RPC requests sent, 634061 RPC replies received (0 XIDs not found)
  average backlog queue length: 0

    164908 ops (26%) 
    avg bytes sent per op: 208  avg bytes received per op: 3457
    backlog wait: 0.112984  RTT: 0.523801   total execute time: 0.651181 (milliseconds)
    156471 ops (24%)    4 retrans (0%)  0 major timeouts
    avg bytes sent per op: 191  avg bytes received per op: 267
    backlog wait: 0.202849  RTT: 0.257179   total execute time: 0.496686 (milliseconds)
    156323 ops (24%) 
    avg bytes sent per op: 236  avg bytes received per op: 215
    backlog wait: 0.007536  RTT: 5.057336   total execute time: 5.319857 (milliseconds)
    156321 ops (24%) 
    avg bytes sent per op: 260  avg bytes received per op: 347
    backlog wait: 0.007126  RTT: 0.473941   total execute time: 0.489806 (milliseconds)

on RedHat based system, it's a part of nfs-util package. In debian based probably in nfs-common.


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.