From owner-freebsd-bugs@FreeBSD.ORG Sat Dec 11 10:23:22 2010 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F16CB10656A3; Sat, 11 Dec 2010 10:23:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 5289D8FC0A; Sat, 11 Dec 2010 10:23:21 +0000 (UTC) Received: from c122-106-172-0.carlnfd1.nsw.optusnet.com.au (c122-106-172-0.carlnfd1.nsw.optusnet.com.au [122.106.172.0]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oBBANJZX010095 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Dec 2010 21:23:20 +1100 Date: Sat, 11 Dec 2010 21:23:19 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warren Block In-Reply-To: <201012102359.oBANxHIs027355@red.freebsd.org> Message-ID: <20101211210136.M2559@besplex.bde.org> References: <201012102359.oBANxHIs027355@red.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-bugs@FreeBSD.org, freebsd-gnats-submit@FreeBSD.org Subject: Re: bin/153012: iostat(8) requires an argument to -c option X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Dec 2010 10:23:23 -0000 On Fri, 10 Dec 2010, Warren Block wrote: >> Description: > iostat(8) says: > > -c Repeat the display count times. If no repeat count is specified, > the default is infinity. This used to be correct. It said "if no wait interval is specified, then the default [for the wait interval] is 1 second". This was a bit confusing since it didn't say that the default is for the wait interval. Now it is just broken, since it is the -c option and not its repeat count that is optional. > But if you try to run it without a repeat count: > > % iostat -c > iostat: option requires an argument -- c > usage: iostat [-CdhIKoTxz?] [-c count] [-M core] [-n devs] [-N system] > [-t type,if,pass] [-w wait] [drives] The synopsis and usage message correctly specify that -c must have an arg. The -w option has the complement of this breakage. Either -w wait or the the normal way using the undocumented alias for this ("iostat wait", where `wait is a number') must be used to specifiy the wait time for -c. Not documenting this may be intentional, but it became especially broken when the `drives' option was added, since according to the synopsis and usage message "iostat 1" says to give statistics for the drive named "1", but it is actually an alias for "iostat -w 1". Bruce