From owner-freebsd-bugs@FreeBSD.ORG Sat Dec 11 10:30:15 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6DF1106566B for ; Sat, 11 Dec 2010 10:30:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 95A088FC12 for ; Sat, 11 Dec 2010 10:30:15 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oBBAUF7A059160 for ; Sat, 11 Dec 2010 10:30:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oBBAUFLh059156; Sat, 11 Dec 2010 10:30:15 GMT (envelope-from gnats) Date: Sat, 11 Dec 2010 10:30:15 GMT Message-Id: <201012111030.oBBAUFLh059156@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Bruce Evans Cc: 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 Reply-To: Bruce Evans List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Dec 2010 10:30:15 -0000 The following reply was made to PR bin/153012; it has been noted by GNATS. From: Bruce Evans To: Warren Block Cc: freebsd-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: bin/153012: iostat(8) requires an argument to -c option Date: Sat, 11 Dec 2010 21:23:19 +1100 (EST) 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