Skip to content

Commit 05f4940

Browse files
committed
Reformat cli help and man page to be in sync
The man page and CLI usage statements were both a little out of sync and neither fully alphabetized correctly. That has been fixed. One outstanding question is whether to get rid of the ellipses on the CLI usage. Signed-off-by: Cameron Harr <[email protected]>
1 parent 2e5e4bb commit 05f4940

File tree

2 files changed

+43
-35
lines changed

2 files changed

+43
-35
lines changed

cmd/zpool/zpool_main.c

Lines changed: 13 additions & 11 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 [--power] [-j [--json-int, "
525-
"--json-flat-vdevs, ...\n"
526-
"\t --json-pool-key-guid]] [-c [script1,script2,...]] "
524+
return (gettext("\tstatus [-c script1[,script2,...]] "
527525
"[-dDegiLpPstvx] ...\n"
528-
"\t [-T d|u] [pool] [interval [count]]\n"));
526+
"\t [-j [--json-int] [--json-flat-vdevs] "
527+
"[--json-pool-key-guid]] ...\n"
528+
"\t [--power] [-T d|u] [pool] [interval [count]]\n"));
529529
case HELP_UPGRADE:
530530
return (gettext("\tupgrade\n"
531531
"\tupgrade -v\n"
@@ -10980,28 +10980,30 @@ status_callback(zpool_handle_t *zhp, void *data)
1098010980
}
1098110981

1098210982
/*
10983-
* zpool status [-c [script1,script2,...]] [-dDegiLpPstvx] [--power] ...
10984-
* [-T d|u] [pool] [interval [count]]
10983+
* zpool status [-c [script1,script2,...]] [-dDegiLpPstvx] ...
10984+
* [-j [--json-int] [--json-flat-vdevs] ...
10985+
* [--json-pool-key-guid]] [--power] [-T d|u] ...
10986+
* [pool] [interval [count]]
1098510987
*
1098610988
* -c CMD For each vdev, run command CMD
1098710989
* -d Display Direct I/O write verify errors
1098810990
* -D Display dedup status (undocumented)
1098910991
* -e Display only unhealthy vdevs
1099010992
* -g Display guid for individual vdev name.
1099110993
* -i Display vdev initialization status.
10994+
* -j [...] Display output in JSON format
10995+
* --json-int Display numbers in inteeger format instead of string
10996+
* --json-flat-vdevs Display vdevs in flat hierarchy
10997+
* --json-pool-key-guid Use pool GUID as key for pool objects
1099210998
* -L Follow links when resolving vdev path name.
1099310999
* -p Display values in parsable (exact) format.
1099411000
* -P Display full path for vdev name.
11001+
* --power Display vdev enclosure slot power status
1099511002
* -s Display slow IOs column.
1099611003
* -t Display vdev TRIM status.
1099711004
* -T Display a timestamp in date(1) or Unix format
1099811005
* -v Display complete error logs
1099911006
* -x Display only pools with potential problems
11000-
* -j Display output in JSON format
11001-
* --power Display vdev enclosure slot power status
11002-
* --json-int Display numbers in inteeger format instead of string
11003-
* --json-flat-vdevs Display vdevs in flat hierarchy
11004-
* --json-pool-key-guid Use pool GUID as key for pool objects
1100511007
*
1100611008
* Describes the health status of all pools or some subset.
1100711009
*/

man/man8/zpool-status.8

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,17 @@
3737
.Sh SYNOPSIS
3838
.Nm zpool
3939
.Cm status
40+
.Op Fl c Ar script1 Ns Oo , Ns Ar script2 Ns ,… Oc
4041
.Op Fl dDegiLpPstvx
41-
.Op Fl T Sy u Ns | Ns Sy d
42-
.Op Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns
43-
.Oo Ar pool Oc Ns
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
46+
.Oc
47+
.Op Fl Fl power
48+
.Op Fl T Ar d|u
49+
.Op Ar pool
4450
.Op Ar interval Op Ar count
45-
.Op Fl j Op Ar --json-int, --json-flat-vdevs, --json-pool-key-guid
4651
.
4752
.Sh DESCRIPTION
4853
Displays the detailed health status for the given pools.
@@ -59,9 +64,7 @@ and the estimated time to completion.
5964
Both of these are only approximate, because the amount of data in the pool and
6065
the other workloads on the system can change.
6166
.Bl -tag -width Ds
62-
.It Fl -power
63-
Display vdev enclosure slot power status (on or off).
64-
.It Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns
67+
.It Fl c Ar script1 Ns Oo , Ns Ar script2 Ns ,… Oc
6568
Run a script (or scripts) on each vdev and include the output as a new column
6669
in the
6770
.Nm zpool Cm status
@@ -71,17 +74,6 @@ See the
7174
option of
7275
.Nm zpool Cm iostat
7376
for complete details.
74-
.It Fl j , -json Op Ar --json-int, --json-flat-vdevs, --json-pool-key-guid
75-
Display the status for ZFS pools in JSON format.
76-
Specify
77-
.Sy --json-int
78-
to display numbers in integer format instead of strings.
79-
Specify
80-
.Sy --json-flat-vdevs
81-
to display vdevs in flat hierarchy instead of nested vdev objects.
82-
Specify
83-
.Sy --json-pool-key-guid
84-
to set pool GUID as key for pool objects instead of pool names.
8577
.It Fl d
8678
Display the number of Direct I/O read/write checksum verify errors that have
8779
occurred on a top-level VDEV.
@@ -111,6 +103,18 @@ These GUIDs can be used in place of device names for the zpool
111103
detach/offline/remove/replace commands.
112104
.It Fl i
113105
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
108+
Display the status for ZFS pools in JSON format.
109+
Specify
110+
.Sy --json-int
111+
to display numbers in integer format instead of strings.
112+
Specify
113+
.Sy --json-flat-vdevs
114+
to display vdevs in flat hierarchy instead of nested vdev objects.
115+
Specify
116+
.Sy --json-pool-key-guid
117+
to set pool GUID as key for pool objects instead of pool names.
114118
.It Fl L
115119
Display real paths for vdevs resolving all symbolic links.
116120
This can be used to look up the current block device name regardless of the
@@ -124,6 +128,8 @@ the path.
124128
This can be used in conjunction with the
125129
.Fl L
126130
flag.
131+
.It Fl -power
132+
Display vdev enclosure slot power status (on or off).
127133
.It Fl s
128134
Display the number of leaf vdev slow I/O operations.
129135
This is the number of I/O operations that didn't complete in
@@ -136,18 +142,18 @@ unreasonably long amount of time.
136142
This may indicate a problem with the underlying storage.
137143
.It Fl t
138144
Display vdev TRIM status.
139-
.It Fl T Sy u Ns | Ns Sy d
145+
.It Fl T Sy d Ns | Ns Sy u
140146
Display a time stamp.
141147
Specify
142-
.Sy u
143-
for a printed representation of the internal representation of time.
144-
See
145-
.Xr time 1 .
146-
Specify
147148
.Sy d
148149
for standard date format.
149150
See
150151
.Xr date 1 .
152+
Specify
153+
.Sy u
154+
for a printed representation of the internal representation of time.
155+
See
156+
.Xr time 1 .
151157
.It Fl v
152158
Displays verbose data error information, printing out a complete list of all
153159
data errors since the last complete pool scrub.

0 commit comments

Comments
 (0)