Subject: bin/36445: iostat(8) -x with a wait interval doesn't work
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <juan@mail.xtrarom.org>
List: netbsd-bugs
Date: 06/05/2007 15:35:00
>Number:         36445
>Category:       bin
>Synopsis:       iostat(8) -x with a wait interval doesn't work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 05 15:35:00 +0000 2007
>Originator:     Juan RP
>Release:        NetBSD 4.0_BETA2
>Organization:
Do you need one?
>Environment:
System: NetBSD mandylion 4.0_BETA2 NetBSD 4.0_BETA2 (Xen0-4) #10: Mon May 7 12:49:15 CEST 2007 juan@mandylion:/home/juan/build/src-4/obj/sys/arch/i386/compile/Xen0-4 i386
Architecture: i386
Machine: i386
>Description:

	iostat(8) -x with a wait interval only reports the values
	the first time it runs, after it all values are 0.

	I guess that the code is missing a call to the refresh
	function in the wait interval loop, without looking at the
	code.

$ iostat -w1 -x 
device  read KB/t    r/s   time     MB/s write KB/t    w/s   time     MB/s
cd0          0.00      0   0.00     0.00       0.00      0   0.00     0.00
wd0          3.39     22   0.13     0.07       9.36     69   0.13     0.63
nfs0        12.76      0   0.00     0.00       4.00      0   0.00     0.00
nfs1         0.00      0   0.00     0.00       0.00      0   0.00     0.00
nfs3        59.54      0   0.00     0.00       0.00      0   0.00     0.00
device  read KB/t    r/s   time     MB/s write KB/t    w/s   time     MB/s
cd0          0.00      0   0.00     0.00       0.00      0   0.00     0.00
wd0          0.00      0   0.00     0.00       2.00      2   0.00     0.00
nfs0         0.00      0   0.00     0.00       0.00      0   0.00     0.00
nfs1         0.00      0   0.00     0.00       0.00      0   0.00     0.00
nfs3         0.00      0   0.00     0.00       0.00      0   0.00     0.00
device  read KB/t    r/s   time     MB/s write KB/t    w/s   time     MB/s
cd0          0.00      0   0.00     0.00       0.00      0   0.00     0.00
wd0          0.00      0   0.00     0.00       0.00      0   0.00     0.00
nfs0         0.00      0   0.00     0.00       0.00      0   0.00     0.00
nfs1         0.00      0   0.00     0.00       0.00      0   0.00     0.00
nfs3         0.00      0   0.00     0.00       0.00      0   0.00     0.00
^C
$

	NetBSD 4.0 and -current are affected.

>How-To-Repeat:
>Fix:
	Yes, please.