From owner-freebsd-bugs@FreeBSD.ORG Fri Dec 13 18:00:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEAD0803 for ; Fri, 13 Dec 2013 18:00:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B993C1E41 for ; Fri, 13 Dec 2013 18:00:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rBDI00M1057274 for ; Fri, 13 Dec 2013 18:00:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rBDI009P057273; Fri, 13 Dec 2013 18:00:00 GMT (envelope-from gnats) Resent-Date: Fri, 13 Dec 2013 18:00:00 GMT Resent-Message-Id: <201312131800.rBDI009P057273@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, ShelLuser Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A6F47E4 for ; Fri, 13 Dec 2013 17:57:31 +0000 (UTC) Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C3121E30 for ; Fri, 13 Dec 2013 17:57:31 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rBDHvUQT089088 for ; Fri, 13 Dec 2013 17:57:30 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rBDHvU6Z089087; Fri, 13 Dec 2013 17:57:30 GMT (envelope-from nobody) Message-Id: <201312131757.rBDHvU6Z089087@oldred.freebsd.org> Date: Fri, 13 Dec 2013 17:57:30 GMT From: ShelLuser To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: bin/184755: The vmstat manualpage synopsis doesn't show all optional parameters X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 18:00:01 -0000 >Number: 184755 >Category: bin >Synopsis: The vmstat manualpage synopsis doesn't show all optional parameters >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 13 18:00:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: ShelLuser >Release: 9.2-p2 >Organization: >Environment: FreeBSD smtp2.losoco.com 9.2-RELEASE-p2 FreeBSD 9.2-RELEASE-p2 #2 r258858: Wed Dec 4 23:53:05 CET 2013 peter@smtp2.losoco.com:/usr/obj/usr/src92/sys/SECKERNEL amd64 >Description: The vmstat(8) manualpage shows the following synopsis: vmstat [-afHhimPsz] [-c count] [-M core [-N system]] [-w wait] [-n devs] [-p type,if,pass] [disks] So it basically says that if you supply an optional parameter without specifying a specific option (-c, -M, etc.) then you're specifying the disk to display. We can see that this works as expected: smtp2:/home/peter $ sysctl kern.disks kern.disks: vtbd0 smtp2:/home/peter $ vmstat vtbd0 procs memory page disk faults cpu r b w avm fre flt re pi po fr sr vt0 in sy cs us sy id 0 0 0 4271M 399M 996 0 0 0 1096 24 0 22 1353 470 2 1 97 However, if you provide a numerical parameter which isn't a disk (GEOM?) then it will be used to provide a value for the -w option (-w: "Pause 'wait' seconds between each display"). As can be seen here: smtp2:/home/peter $ time vmstat 2 procs memory page disk faults cpu r b w avm fre flt re pi po fr sr vt0 in sy cs us sy id 0 0 0 4351M 384M 996 0 0 0 1095 24 0 22 1352 470 2 1 97 0 0 0 4351M 384M 16 0 0 0 0 0 0 4 263 253 0 0 100 0 0 0 4351M 384M 16 0 0 0 148 0 40 26 224 453 0 1 99 ^C 4.51s real 0.00s user 0.03s system Better yet: even if you do specify a disk then you can also provide an extra numerical parameter which will then be used as the wait interval. >How-To-Repeat: Start vmstat with a numerical parameter, either on its own or in addition to providing the disk to work on. It will continue to display values at an interval equal to the value of the numerical parameter. >Fix: My suggestion would be to change the synopsis section of the vmstat(8) manualpage as follows: SYNOPSIS vmstat [-afHhimPsz] [-c count] [-M core [-N system]] [-w wait] [-n devs] [-p type,if,pass] [disks] [interval] >Release-Note: >Audit-Trail: >Unformatted: