Skip to content

Commit

Permalink
zpool iostat shows which vdevs are ssd, hdd or mixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
inkdot7 committed Sep 20, 2016
1 parent 45082bc commit c194ebd
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions cmd/zpool/zpool_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2785,6 +2785,9 @@ print_iostat_dashes(iostat_cbdata_t *cb, unsigned int force_column_width,
(void) printf("-");
}

if (!(cb->cb_flags & IOS_ANYHISTO_M))
printf(" -");

/* For each bit in flags */
for (f = flags; f; f &= ~(1ULL << idx)) {
unsigned int column_width;
Expand Down Expand Up @@ -2843,11 +2846,16 @@ print_iostat_header_impl(iostat_cbdata_t *cb, unsigned int force_column_width,
else
printf("%*s", namewidth, "");

if (!(cb->cb_flags & IOS_ANYHISTO_M))
printf(" ");

print_iostat_labels(cb, force_column_width, iostat_top_labels);

printf("%-*s", namewidth, title);

if (!(cb->cb_flags & IOS_ANYHISTO_M))
printf("ssd");

print_iostat_labels(cb, force_column_width, iostat_bottom_labels);

print_iostat_separator_impl(cb, force_column_width);
Expand Down Expand Up @@ -3347,6 +3355,24 @@ print_vdev_stats(zpool_handle_t *zhp, const char *name, nvlist_t *oldnv,
(int)(cb->cb_namewidth - strlen(name) -
depth), "");
}
if (cb->cb_scripted)
printf("\t");
else
printf(" ");
switch (newvs->vs_nonrotational) {
case VDEV_NONROTATIONAL_YES:
(void) printf("y");
break;
case VDEV_NONROTATIONAL_MIXED:
(void) printf("m");
break;
case VDEV_NONROTATIONAL_NO:
(void) printf("n");
break;
default:
(void) printf("?");
break;
}
}

/* Calculate our scaling factor */
Expand Down

0 comments on commit c194ebd

Please sign in to comment.