diff options
author | Andy Fiddaman <omnios@citrus-it.co.uk> | 2019-09-24 16:26:31 +0000 |
---|---|---|
committer | Andy Fiddaman <omnios@citrus-it.co.uk> | 2019-09-25 14:21:51 +0000 |
commit | c4e4d4102c8a8c2cc936dd971bdafe4ec52fd4cf (patch) | |
tree | d27ab84c52c700ae8aa9a26f7c16574dc677d887 | |
parent | b97b1727bc40d7d32c5d78e751b231aa5b8778ed (diff) | |
download | illumos-joyent-c4e4d4102c8a8c2cc936dd971bdafe4ec52fd4cf.tar.gz |
11747 zpool iostat -v no longer shows titles for log/bias sections
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Jim Klimov <jim@cos.ru>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/cmd/zpool/zpool_main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/src/cmd/zpool/zpool_main.c b/usr/src/cmd/zpool/zpool_main.c index 61a63aaade..50935f4112 100644 --- a/usr/src/cmd/zpool/zpool_main.c +++ b/usr/src/cmd/zpool/zpool_main.c @@ -31,6 +31,7 @@ * Copyright (c) 2019, loli10K <ezomori.nozomu@gmail.com> * Copyright 2019 Joyent, Inc. * Copyright (c) 2012 by Cyril Plisko. All rights reserved. + * Copyright 2019 OmniOS Community Edition (OmniOSce) Association. */ #include <assert.h> @@ -3226,6 +3227,7 @@ print_vdev_stats(zpool_handle_t *zhp, const char *name, nvlist_t *oldnv, * print all other top-level devices */ for (uint_t n = 0; n < 3; n++) { + boolean_t printed = B_FALSE; for (c = 0; c < children; c++) { uint64_t islog = B_FALSE; char *bias = NULL; @@ -3246,6 +3248,17 @@ print_vdev_stats(zpool_handle_t *zhp, const char *name, nvlist_t *oldnv, if (!islog && strcmp(type, VDEV_TYPE_INDIRECT) == 0) continue; + if (!printed) { + if (!cb->cb_scripted) { + (void) printf( + "%-*s - - - -" + " - -", + cb->cb_namewidth, class_name[n]); + } + printf("\n"); + printed = B_TRUE; + } + vname = zpool_vdev_name(g_zfs, zhp, newchild[c], cb->cb_name_flags); print_vdev_stats(zhp, vname, oldnv ? |