aboutsummaryrefslogtreecommitdiff
path: root/man/man8/zpool-list.8
diff options
context:
space:
mode:
Diffstat (limited to 'man/man8/zpool-list.8')
-rw-r--r--man/man8/zpool-list.8111
1 files changed, 109 insertions, 2 deletions
diff --git a/man/man8/zpool-list.8 b/man/man8/zpool-list.8
index 88183b4dce1a..b0ee659701d4 100644
--- a/man/man8/zpool-list.8
+++ b/man/man8/zpool-list.8
@@ -6,7 +6,7 @@
.\" You may not use this file except in compliance with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-.\" or http://www.opensolaris.org/os/licensing.
+.\" or https://opensource.org/licenses/CDDL-1.0.
.\" See the License for the specific language governing permissions
.\" and limitations under the License.
.\"
@@ -37,6 +37,7 @@
.Nm zpool
.Cm list
.Op Fl HgLpPv
+.Op Fl j Op Ar --json-int, --json-pool-key-guid
.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns …
.Op Fl T Sy u Ns | Ns Sy d
.Oo Ar pool Oc Ns …
@@ -58,6 +59,14 @@ is specified, the command exits after
.Ar count
reports are printed.
.Bl -tag -width Ds
+.It Fl j Op Ar --json-int, --json-pool-key-guid
+Display the list of pools in JSON format.
+Specify
+.Sy --json-int
+to display the numbers in integer format instead of strings.
+Specify
+.Sy --json-pool-key-guid
+to set pool GUID as key for pool objects instead of pool names.
.It Fl g
Display vdev GUIDs instead of the normal device names.
These GUIDs can be used in place of device names for the zpool
@@ -95,7 +104,7 @@ Specify
.Sy u
for a printed representation of the internal representation of time.
See
-.Xr time 2 .
+.Xr time 1 .
Specify
.Sy d
for standard date format.
@@ -141,6 +150,104 @@ data 23.9G 14.6G 9.30G - 48% 61% 1.00x ONLINE -
sdc - - - - -
.Ed
.
+.Ss Example 3 : No Displaying expanded space on a device
+The following command lists all available pools on the system in JSON
+format.
+.Bd -literal -compact -offset Ds
+.No # Nm zpool Cm list Fl j | Nm jq
+{
+ "output_version": {
+ "command": "zpool list",
+ "vers_major": 0,
+ "vers_minor": 1
+ },
+ "pools": {
+ "tank": {
+ "name": "tank",
+ "type": "POOL",
+ "state": "ONLINE",
+ "guid": "15220353080205405147",
+ "txg": "2671",
+ "spa_version": "5000",
+ "zpl_version": "5",
+ "properties": {
+ "size": {
+ "value": "111G",
+ "source": {
+ "type": "NONE",
+ "data": "-"
+ }
+ },
+ "allocated": {
+ "value": "30.8G",
+ "source": {
+ "type": "NONE",
+ "data": "-"
+ }
+ },
+ "free": {
+ "value": "80.2G",
+ "source": {
+ "type": "NONE",
+ "data": "-"
+ }
+ },
+ "checkpoint": {
+ "value": "-",
+ "source": {
+ "type": "NONE",
+ "data": "-"
+ }
+ },
+ "expandsize": {
+ "value": "-",
+ "source": {
+ "type": "NONE",
+ "data": "-"
+ }
+ },
+ "fragmentation": {
+ "value": "0%",
+ "source": {
+ "type": "NONE",
+ "data": "-"
+ }
+ },
+ "capacity": {
+ "value": "27%",
+ "source": {
+ "type": "NONE",
+ "data": "-"
+ }
+ },
+ "dedupratio": {
+ "value": "1.00x",
+ "source": {
+ "type": "NONE",
+ "data": "-"
+ }
+ },
+ "health": {
+ "value": "ONLINE",
+ "source": {
+ "type": "NONE",
+ "data": "-"
+ }
+ },
+ "altroot": {
+ "value": "-",
+ "source": {
+ "type": "DEFAULT",
+ "data": "-"
+ }
+ }
+ }
+ }
+ }
+}
+
+.Ed
+.
.Sh SEE ALSO
.Xr zpool-import 8 ,
.Xr zpool-status 8