Bug 229398

Summary: zpool list -H -p inconsistent output format for Frag
Product: Base System Reporter: Miroslav Lachman <000.fbsd>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Some People    
Priority: ---    
Version: 10.4-RELEASE   
Hardware: Any   
OS: Any   

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.