Skip to content

Commit 92157c8

Browse files
cmharrbehlendorf
authored andcommitted
Refactor man page and CLI help output per mandoc
The man page and the usage statement from the CLI have been refactored to abide by the ManDoc standard. Style changes include: * Upper-case letters before lower-case * List short options w/o arguments first * Then list short options w/ arguments * Then list long arguments Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Cameron Harr <[email protected]> Closes #17357
1 parent cdb4c44 commit 92157c8

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

cmd/zpool/zpool_main.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,11 @@ get_usage(zpool_help_t idx)
521521
return (gettext("\ttrim [-dw] [-r <rate>] [-c | -s] <pool> "
522522
"[<device> ...]\n"));
523523
case HELP_STATUS:
524-
return (gettext("\tstatus [-c script1[,script2,...]] "
525-
"[-dDegiLpPstvx] ...\n"
526-
"\t [-j [--json-int] [--json-flat-vdevs] "
524+
return (gettext("\tstatus [-DdegiLPpstvx] "
525+
"[-c script1[,script2,...]] ...\n"
526+
"\t [-j|--json [--json-flat-vdevs] [--json-int] "
527527
"[--json-pool-key-guid]] ...\n"
528-
"\t [--power] [-T d|u] [pool] [interval [count]]\n"));
528+
"\t [-T d|u] [--power] [pool] [interval [count]]\n"));
529529
case HELP_UPGRADE:
530530
return (gettext("\tupgrade\n"
531531
"\tupgrade -v\n"
@@ -10980,28 +10980,28 @@ status_callback(zpool_handle_t *zhp, void *data)
1098010980
}
1098110981

1098210982
/*
10983-
* zpool status [-c [script1,script2,...]] [-dDegiLpPstvx] ...
10984-
* [-j [--json-int] [--json-flat-vdevs] ...
10983+
* zpool status [-dDegiLpPstvx] [-c [script1,script2,...]] ...
10984+
* [-j|--json [--json-flat-vdevs] [--json-int] ...
1098510985
* [--json-pool-key-guid]] [--power] [-T d|u] ...
1098610986
* [pool] [interval [count]]
1098710987
*
1098810988
* -c CMD For each vdev, run command CMD
10989-
* -d Display Direct I/O write verify errors
1099010989
* -D Display dedup status (undocumented)
10990+
* -d Display Direct I/O write verify errors
1099110991
* -e Display only unhealthy vdevs
1099210992
* -g Display guid for individual vdev name.
1099310993
* -i Display vdev initialization status.
1099410994
* -j [...] Display output in JSON format
10995-
* --json-int Display numbers in inteeger format instead of string
1099610995
* --json-flat-vdevs Display vdevs in flat hierarchy
10996+
* --json-int Display numbers in integer format instead of string
1099710997
* --json-pool-key-guid Use pool GUID as key for pool objects
1099810998
* -L Follow links when resolving vdev path name.
10999-
* -p Display values in parsable (exact) format.
1100010999
* -P Display full path for vdev name.
11000+
* -p Display values in parsable (exact) format.
1100111001
* --power Display vdev enclosure slot power status
1100211002
* -s Display slow IOs column.
11003-
* -t Display vdev TRIM status.
1100411003
* -T Display a timestamp in date(1) or Unix format
11004+
* -t Display vdev TRIM status.
1100511005
* -v Display complete error logs
1100611006
* -x Display only pools with potential problems
1100711007
*

man/man8/zpool-status.8

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@
3737
.Sh SYNOPSIS
3838
.Nm zpool
3939
.Cm status
40+
.Op Fl DdegiLPpstvx
4041
.Op Fl c Ar script1 Ns Oo , Ns Ar script2 Ns ,… Oc
41-
.Op Fl dDegiLpPstvx
42-
.Oo Fl j
43-
.Oo Ns Fl Fl json-int Oc
44-
.Oo Ns Fl Fl json-flat-vdevs Oc
45-
.Oo Ns Fl Fl json-pool-key-guid Oc
42+
.Oo Fl j|--json
43+
.Oo Ns Fl -json-flat-vdevs Oc
44+
.Oo Ns Fl -json-int Oc
45+
.Oo Ns Fl -json-pool-key-guid Oc
4646
.Oc
47-
.Op Fl Fl power
4847
.Op Fl T Ar d|u
48+
.Op Fl -power
4949
.Op Ar pool
5050
.Op Ar interval Op Ar count
5151
.
@@ -74,6 +74,14 @@ See the
7474
option of
7575
.Nm zpool Cm iostat
7676
for complete details.
77+
.It Fl D
78+
Display a histogram of deduplication statistics, showing the allocated
79+
.Pq physically present on disk
80+
and referenced
81+
.Pq logically referenced in the pool
82+
block counts and sizes by reference count.
83+
If repeated, (-DD), also shows statistics on how much of the DDT is resident
84+
in the ARC.
7785
.It Fl d
7886
Display the number of Direct I/O read/write checksum verify errors that have
7987
occurred on a top-level VDEV.
@@ -87,14 +95,6 @@ Direct I/O reads checksum verify errors can also occur if the contents of the
8795
buffer are being manipulated after the I/O has been issued and is in flight.
8896
In the case of Direct I/O read checksum verify errors, the I/O will be reissued
8997
through the ARC.
90-
.It Fl D
91-
Display a histogram of deduplication statistics, showing the allocated
92-
.Pq physically present on disk
93-
and referenced
94-
.Pq logically referenced in the pool
95-
block counts and sizes by reference count.
96-
If repeated, (-DD), also shows statistics on how much of the DDT is resident
97-
in the ARC.
9898
.It Fl e
9999
Only show unhealthy vdevs (not-ONLINE or with errors).
100100
.It Fl g
@@ -103,31 +103,31 @@ These GUIDs can be used in place of device names for the zpool
103103
detach/offline/remove/replace commands.
104104
.It Fl i
105105
Display vdev initialization status.
106-
.It Fl j , -json Oo Ns Fl Fl json-int Oc Oo Ns Fl Fl json-flat-vdevs Oc \
107-
Oo Ns Fl Fl json-pool-key-guid Oc
106+
.It Fl j , -json Oo Ns Fl -json-flat-vdevs Oc Oo Ns Fl -json-int Oc \
107+
Oo Ns Fl -json-pool-key-guid Oc
108108
Display the status for ZFS pools in JSON format.
109109
Specify
110-
.Sy --json-int
111-
to display numbers in integer format instead of strings.
112-
Specify
113110
.Sy --json-flat-vdevs
114111
to display vdevs in flat hierarchy instead of nested vdev objects.
115112
Specify
113+
.Sy --json-int
114+
to display numbers in integer format instead of strings.
115+
Specify
116116
.Sy --json-pool-key-guid
117117
to set pool GUID as key for pool objects instead of pool names.
118118
.It Fl L
119119
Display real paths for vdevs resolving all symbolic links.
120120
This can be used to look up the current block device name regardless of the
121121
.Pa /dev/disk/
122122
path used to open it.
123-
.It Fl p
124-
Display numbers in parsable (exact) values.
125123
.It Fl P
126124
Display full paths for vdevs instead of only the last component of
127125
the path.
128126
This can be used in conjunction with the
129127
.Fl L
130128
flag.
129+
.It Fl p
130+
Display numbers in parsable (exact) values.
131131
.It Fl -power
132132
Display vdev enclosure slot power status (on or off).
133133
.It Fl s
@@ -140,8 +140,6 @@ This does not necessarily mean the I/O operations failed to complete, just took
140140
an
141141
unreasonably long amount of time.
142142
This may indicate a problem with the underlying storage.
143-
.It Fl t
144-
Display vdev TRIM status.
145143
.It Fl T Sy d Ns | Ns Sy u
146144
Display a time stamp.
147145
Specify
@@ -154,6 +152,8 @@ Specify
154152
for a printed representation of the internal representation of time.
155153
See
156154
.Xr time 1 .
155+
.It Fl t
156+
Display vdev TRIM status.
157157
.It Fl v
158158
Displays verbose data error information, printing out a complete list of all
159159
data errors since the last complete pool scrub.

0 commit comments

Comments
 (0)