I am trying to get NFS Version 3 statistics from a C program under
HP-UX 11, AIX 4.3 and Solaris 2.6. I would like to do like nfsstat does
to get at the stats.
If someone can help, Please let me know how to get at these
I can tell you where you can find the NFS stats for the platforms you
asked, and I leave it to you to crack down further.
You can get the values from the kernel variables. The kernel variables
you have to look are:
rfsreqcnt_v2 -> NFS Client V2
rfsreqcnt_v3 -> NFS Client V3
rfsproccnt_v2_ptr -> NFS Server V2
rfsproccnt_v3_ptr -> NFS Server V3.
You can get the values from the system call nfs_cntl(). If the
/usr/sbin/nfsstat is unstripped (in my AIX box it is so), run it on
a de* (I used xldb). You can see what values to be passed to
nfs_cntl() call to get the various NFS stats.
The kstat_open() and kstat_read() calls can give you. The names that to
be passed to kstat call are, rfsreqcnt_v3 (client data for NFS 3) and
rfsproccnt_v3 (server data for NFS 3).
Hope this helps you.
> I am trying to get NFS Version 3 statistics from a C program under
> HP-UX 11, AIX 4.3 and Solaris 2.6. I would like to do like nfsstat does
> to get at the stats.
> If someone can help, Please let me know how to get at these
I'm having a real problem with very slow NFS write performance from Linux
clients running Redhat 4.2, 5.0, and 5.1 to servers running NFS version
3.0. The servers indicate that the Linux clients are mounted using NFS v2.
The servers I have are running Solaris 2.5.1 and 2.6 on both Intel and SPARC
hardware. Others have reported the same problem with Alpha servers running
Digital UNIX and NFS v3. My servers are all up to date on patches. The
network (Fast Ethernet) is not the problem as I have this problem on two
isolated networks at different locations. NFS read performance is normal.
I have increased the rsize and wsize to 8192, which doubled the performance,
and have played with every option I thought would help. Now the writes are
only a factor of 10 times slower than FTP'ing the file and 6 times slower
than other clients running Solaris 2.5.1 and NFS v3 using TCP.
I'm getting desperate as everyone is screaming about the slow performance.
I'm hoping that someone has solved this problem. Surely I don't have to put
extra disks of home directories on these Linux boxes to be able to use NFS.
I just installed Redhat 5.1 hoping that would fix my problem, but its no
different. Why is it taking so long to add NFS version 3.0 protocols to
Linux? It has been available from other vendors for well over a year. The
performance of version 3.0 using TCP is significantly faster than version
Thanks in advance for any help. I will post a summary if I find a solution.