]> granicus.if.org Git - sysstat/commit
Fixed several bufs with nfsiostat (and cifsiostat).
authorSebastien Godard <sysstat@orange.fr>
Fri, 11 Mar 2011 13:45:05 +0000 (14:45 +0100)
committerSebastien Godard <sysstat@orange.fr>
Fri, 11 Mar 2011 13:45:05 +0000 (14:45 +0100)
commit91b398ff340bfa7d0acd9355f502c865830c0fb0
treeb186b429e32bd38dc5bd59a6b5bdd4edbd7a4cd7
parentb6d1f73859ec1fef3bf89d4bf5893aa2aaf11e10
Fixed several bufs with nfsiostat (and cifsiostat).

Mail from Masanari Iida (masanari.iida@hp.com) 08/02/2011:

Sebastien,

Thanks for the fix.
Before you release the core on end of Feb,  I would ask you to test the
code with following 2 scenario.

(1)  Mount / Umount while nfsiostat running.
Check points
(a)  nfsiostat detect new nfs mount points after nfsiostat started.
The mounted NFS share have to be reported by nfsiostat.

(b)  nfsiostat detect nfs mount points which is umounted after nfsiostat started.
No lines reported by nfsiostat  after umount NFS share.

This is an original bug scenario that I reported to you in the first e-mail.

(2) nfsiostat not showing incorrect value when NFS mount point re-mount happen.
Following symptom was seen on sysstat 7.0.2 (on RHEL5).

Step to reproduce.
(1)  Mount an NFS share
(2)  Run iostat  (or nfsiostat)
(3)  Umount the NFS share
(4)  Mount the same NFS share that umounted in step 3.
(5)  Check the iostat result for the NFS share.

Actual Result on sysstat 7.0.2.
Very large value for rops/s and wops/s display one time.
These are incorrect values.

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           7.25    0.00    2.25    0.00    0.00   90.50

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn

Device:                   rkB_nor/s    wkB_nor/s    rkB_dir/s    wkB_dir/s    rkB_svr/s    wkB_svr/s    rops/s    wops/s
abc123.jpn.hp.com:/nfs-test         0.00         0.00         0.00         0.00         0.00         0.00 18446744073709551616.00 18446744073709551616.00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.25    0.00    0.00    0.00    0.00   99.75

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn

Device:                   rkB_nor/s    wkB_nor/s    rkB_dir/s    wkB_dir/s    rkB_svr/s    wkB_svr/s    rops/s    wops/s
abc123.jpn.hp.com:/nfs-test         0.00         0.00         0.00         0.00         0.00         0.00      1.00      1.00

Expected result.
The nfsiostat reported correct value for rops/s and  wops/s
even when the NFS mount point re-mounted while nfsiostat running.

Regards,
Masanari Iida

Mail from Masanari Iida (masanari.iida@hp.com) 24/02/2011:

Hello,

Thank you for your support.

I have tested your new code.
The bugs that I have reported in previous e-mail are fixed on this version.
So I don't get no more coredump, and nfsiostat detect all mounted and
umounted filesystems while running.

One minor issue still remain here.
On 2nd result of the nfsiostat always include some unknown value.

swift.jpn.hp.com:/src          0.00         0.00         0.00         0.00         0.00         0.00      0.00      0.00      0.00
swift.jpn.hp.com:/src          0.00         0.00         0.00         0.00         0.00         0.00 516000.00      0.00      0.00   <<
swift.jpn.hp.com:/src          0.00         0.00         0.00         0.00         0.00         0.00      0.00      0.00      0.00
swift.jpn.hp.com:/src          0.00         0.00         0.00         0.00         0.00         0.00      0.00      0.00      0.00
swift.jpn.hp.com:/src          0.00         0.00         0.00         0.00         0.00         0.00      0.00      0.00      0.00

blxc:/hptc_cluster         0.00         0.00         0.00         0.00         0.00         0.00      0.00      0.00      0.00
blxc:/hptc_cluster  31130270.51         0.00         0.00         0.00   9139775.59         0.00 1280500.00 603100.00      0.00 <<
blxc:/hptc_cluster         0.00         0.00         0.00         0.00         0.00         0.00      0.00      0.00      0.00
blxc:/hptc_cluster         0.00         0.00         0.00         0.00         0.00         0.00      0.00      0.00      0.00
blxc:/hptc_cluster         0.00         0.00         0.00         0.00         0.00         0.00      0.00      0.00      0.00

(These 0 data are correct, since I just mount the NFS share and not doing
any I/O during the test. )

How to reproduce 1
(1) Mount one NFS filesystem.
(2) Run nfsiostat with interval and count options.  The count must be 3 or more.
(3) Check the 2nd result from nfsiostat.

How to reproduce 2
(1) Run nfsiostat with interval.
(2) Mount the NFS filesystem while running the nfsiostat.
(3) Check the 2nd result of the just mounted NFS filesystem.

I know that vmstat or iostat case,  the first result is a history of data since OS boot.
So I usually ignore the first data and use after the 2nd result.
In NFS automount enviroment,  NFS mount/umount happen at random timing.
So it is hard to remove these sudden large value from data.

Impact.
When a script draw a graph, these sudden large values expand Y scale.
So the normal value may looks smaller than expected in the graph.

Regards,
Masanari Iida
cifsiostat.c
nfsiostat.c
nls/sysstat.pot