Subject: Re: bin/36445: iostat(8) -x with a wait interval doesn't work
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Antti Kantee <pooka@cs.hut.fi>
List: netbsd-bugs
Date: 06/05/2007 15:45:03
The following reply was made to PR bin/36445; it has been noted by GNATS.

From: Antti Kantee <pooka@cs.hut.fi>
To: juan@mail.xtrarom.org
Cc: gnats-bugs@netbsd.org
Subject: Re: bin/36445: iostat(8) -x with a wait interval doesn't work
Date: Tue, 5 Jun 2007 18:44:35 +0300

 On Tue Jun 05 2007 at 15:35:00 +0000, juan@mail.xtrarom.org wrote:
 > 	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
                                                  ^^^^^^^^^^^
 That's a pretty large value of 0.
 
 > 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
 
 -- 
 Antti Kantee <pooka@iki.fi>                     Of course he runs NetBSD
 http://www.iki.fi/pooka/                          http://www.NetBSD.org/
     "la qualité la plus indispensable du cuisinier est l'exactitude"