Project

General

Profile

Bug #1946

incorrect formatting when listing output of multiple pools with zpool iostat -v

Added by Frederik Wessels over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Low
Category:
cmd - userland programs
Start date:
2012-01-04
Due date:
% Done:

100%

Estimated time:
1.00 h
Difficulty:
Bite-size
Tags:

Description

first zpool iostat -v mpool (for the expected output)

storkone@oistor1:/$ zpool iostat -v mpool
                              capacity     operations    bandwidth
pool                       alloc   free   read  write   read  write
-------------------------  -----  -----  -----  -----  -----  -----
mpool                       304G  3.33T      0      1    629  71.9K
  mirror                    152G  1.66T      0      0    324  17.3K
    c1t50024E9204294EE5d0      -      -      0      0    198  17.3K
    c1t50024E900499258Fd0      -      -      0      0    220  17.3K
  mirror                    152G  1.66T      0      0    296  17.3K
    c1t50024E9004992426d0      -      -      0      0    203  17.3K
    c1t50024E9004992406d0      -      -      0      0    185  17.3K
logs                           -      -      -      -      -      -
  c3t3d0                    176K  3.53G      0      1      8  37.3K
-------------------------  -----  -----  -----  -----  -----  -----

next running zpool iostat -v (no pool name(s) so that all pools get printed) result in the following output

storkone@oistor1:/$ zpool iostat -v
               capacity     operations    bandwidth
pool        alloc   free   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
mpool        304G  3.33T      0      1    628  71.8K
  mirror     152G  1.66T      0      0    324  17.3K
    c1t50024E9204294EE5d0      -      -      0      0    198  17.3K
    c1t50024E900499258Fd0      -      -      0      0    219  17.3K
  mirror     152G  1.66T      0      0    296  17.3K
    c1t50024E9004992426d0      -      -      0      0    202  17.3K
    c1t50024E9004992406d0      -      -      0      0    185  17.3K
logs            -      -      -      -      -      -
  c3t3d0     176K  3.53G      0      1      8  37.2K
----------  -----  -----  -----  -----  -----  -----
rpool2      18.8G   213G      0      0  2.58K  5.09K
  c3t4d0s0  18.8G   213G      0      0  2.58K  5.09K
----------  -----  -----  -----  -----  -----  -----

Even with a proportional spaced font it's clear that long device names suddenly overflow the pool column whereas when running the same command on mpool results in a correct width.

Patch is available and will be submitted as webrev.

History

#1

Updated by Frederik Wessels over 7 years ago

  • % Done changed from 0 to 70

I did publish the webrev on the mailing list already and got already a LGTM but for the sake of completeness here's the webrev

#2

Updated by Rich Lowe over 7 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 70 to 100
  • Tags deleted (needs-triage)

Resolved in r13564 commit:cf89c0c60496

Also available in: Atom PDF