Bug 229398 - zpool list -H -p inconsistent output format for Frag
Summary: zpool list -H -p inconsistent output format for Frag
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.4-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-28 21:46 UTC by Miroslav Lachman
Modified: 2018-06-28 21:46 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Lachman 2018-06-28 21:46:07 UTC
zpool list -H -p or zpool get -H -p should print exact values without unit sufixes. Size, Aloc and Free are OK, Capacity si also printed without percent sign, but Fragmentation is always displayed with percent sign:

# zpool list
NAME    SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
tank0   912G   581G   331G         -    24%    63%  1.00x  ONLINE  -

# zpool list -H -p
tank0   979252543488    623912925184    355339618304    -       24%     63      1.00x   ONLINE  -

# zpool list -H -p -o size
979252543488

# zpool list -H -p -o frag
24%

# zpool list -H -p -o cap
63


The same applies to zpool get

# zpool get -p cap
NAME   PROPERTY  VALUE  SOURCE
tank0  capacity  63     -

# zpool get -p frag
NAME   PROPERTY       VALUE  SOURCE
tank0  fragmentation  24%    -


# zpool get -H -p -o value cap
63

# zpool get -H -p -o value frag
24%


There should not be percent sign.