Bug 194781 - iostat(8) man page incorrect for -w
Summary: iostat(8) man page incorrect for -w
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Alexander Ziaee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-03 13:09 UTC by mwlucas
Modified: 2026-08-06 22:33 UTC (History)
8 users (show)

See Also:


Attachments
-w descripion of iostat man page rewritten/expanded (514 bytes, patch)
2026-06-23 17:09 UTC, Mathias Eggers
no flags Details | Diff
Git format patch with adjustements (903 bytes, text/plain)
2026-06-23 20:12 UTC, Alexander Ziaee
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mwlucas 2014-11-03 13:09:35 UTC
iostat(8) says:

     -w    Pause wait seconds between each display.  If no wait interval is
           specified, the default is 1 second.

iostat itself disagrees:

iostat -xw
iostat: option requires an argument -- w
usage: iostat [-CdhIKoTxz?] [-c count] [-M core] [-n devs] [-N system]
              [-t type,if,pass] [-w wait] [drives]

Suggest dropping the second sentence from the man page entry.
Comment 1 Benjamin Kaduk freebsd_committer freebsd_triage 2014-11-03 16:55:43 UTC
From r215786:

Clarify a few details about iostat(8) behavior:

- The default repeat count for iostat(8) is 1 unless there
  was a -w on the command line.

The second sentence should remain, but perhaps could change to "If -w is not specified, [...]".
Comment 2 Steven Hartland freebsd_committer freebsd_triage 2014-11-03 17:08:40 UTC
No not really as if -w isn't specified it doesn't do interval based display.
Comment 3 Benjamin Kaduk freebsd_committer freebsd_triage 2014-11-03 17:25:56 UTC
(In reply to Steven Hartland from comment #2)
> No not really as if -w isn't specified it doesn't do interval based display.

Not even if a -c count is specified?
Comment 4 Benjamin Kaduk freebsd_committer freebsd_triage 2014-11-03 17:25:56 UTC
(In reply to Steven Hartland from comment #2)
> No not really as if -w isn't specified it doesn't do interval based display.

Not even if a -c count is specified?
Comment 5 Steven Hartland freebsd_committer freebsd_triage 2014-11-03 17:34:44 UTC
You're correct if -c X is specified by no -w then it defaults to 1 second.
Comment 6 Warren Block freebsd_committer freebsd_triage 2014-11-03 18:03:15 UTC
Bug 153012 is similar, and has a patch that might be useful.
Comment 7 Benjamin Kaduk freebsd_committer freebsd_triage 2014-11-03 18:05:08 UTC
The cleanups I made for vmstat.8 in r269727 might also be worth looking at.
Comment 8 tsg168 2024-11-01 12:33:28 UTC
MARKED AS SPAM
Comment 9 Mathias Eggers 2026-06-23 17:09:18 UTC
Created attachment 272080 [details]
-w descripion of iostat man page rewritten/expanded

Following Benjamin's suggestion (see comment #1), I've rewritten/expanded the -w explanation to reflect the behavior in combination with -c.
(Halifax Hackathon 202606)
Comment 10 Alexander Ziaee freebsd_committer freebsd_triage 2026-06-23 20:12:11 UTC
Created attachment 272086 [details]
Git format patch with adjustements

I think it's good to put the description first, then the flag. Also, I really really like semantic line breaks, I think they're much clearer to maintain and better for grep. How's this? I have also put it in a git-format patch, please use these in the future. If you need any help making them I'd be happy to advise!
Comment 11 Alexander Ziaee freebsd_committer freebsd_triage 2026-06-23 20:15:49 UTC
Also thank you so much for fixing this! Merging fixes to very old bugs is incredibly satisfying. Please give my regards to our teammates in Halifax!
Comment 12 Mathias Eggers 2026-06-24 13:37:04 UTC
(In reply to Alexander Ziaee from comment #11)
Thanks for pointing me to git format-patch; I wasn't familiar with it, but I'll definitely use it in the future. 

I like your patch suggestion, and I'll implement it in future patches likewise.

Greetings back from the Halifax Hackathon team!
Comment 13 commit-hook freebsd_committer freebsd_triage 2026-06-25 02:59:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=4d299a767acce2841ded288e789a9c36620b57d7

commit 4d299a767acce2841ded288e789a9c36620b57d7
Author:     Mathias Eggers <mathias.eggers@proton.me>
AuthorDate: 2026-06-23 20:09:24 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2026-06-25 02:57:34 +0000

    iostat.8: Expand -w description

    PR:             194781
    MFC after:      3 days
    Reviewed by:    ziaee
    Event:          Halifax Hackathon 202606

 usr.sbin/iostat/iostat.8 | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 14 Benedict Reuschling freebsd_committer freebsd_triage 2026-06-25 12:24:40 UTC
A patch was committed that fixes the issue. I'm closing this PR. Thanks for filing it and sorry it took so long.
Comment 15 commit-hook freebsd_committer freebsd_triage 2026-06-28 00:45:09 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=62551ae38bf201654ebf2ffd59cb320ac75107a0

commit 62551ae38bf201654ebf2ffd59cb320ac75107a0
Author:     Mathias Eggers <mathias.eggers@proton.me>
AuthorDate: 2026-06-23 20:09:24 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2026-06-28 00:38:12 +0000

    iostat.8: Expand -w description

    PR:             194781
    MFC after:      3 days
    Reviewed by:    ziaee
    Event:          Halifax Hackathon 202606

    (cherry picked from commit 4d299a767acce2841ded288e789a9c36620b57d7)

 usr.sbin/iostat/iostat.8 | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 16 commit-hook freebsd_committer freebsd_triage 2026-08-06 22:33:16 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=2abf4ce4d799d84112402867229c7d5bb4f81a90

commit 2abf4ce4d799d84112402867229c7d5bb4f81a90
Author:     Mathias Eggers <mathias.eggers@proton.me>
AuthorDate: 2026-06-23 20:09:24 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2026-08-06 22:30:35 +0000

    iostat.8: Expand -w description

    PR:             194781
    MFC after:      3 days
    Reviewed by:    ziaee
    Event:          Halifax Hackathon 202606

    (cherry picked from commit 4d299a767acce2841ded288e789a9c36620b57d7)

 usr.sbin/iostat/iostat.8 | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)