summaryrefslogtreecommitdiffstats
path: root/sbin/hastctl
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-05-23 21:15:19 +0000
committerpjd <pjd@FreeBSD.org>2011-05-23 21:15:19 +0000
commit42a14e17b5ae3fb20e7c5cba42663f088ae9fa19 (patch)
tree8bdba7aed6120f1649d55702a6e914918cfa0c9c /sbin/hastctl
parentbef2f8f5d1658b0cc6ec6bbe5c1b792020c86ee9 (diff)
downloadFreeBSD-src-42a14e17b5ae3fb20e7c5cba42663f088ae9fa19.zip
FreeBSD-src-42a14e17b5ae3fb20e7c5cba42663f088ae9fa19.tar.gz
Keep statistics on number of BIO_READ, BIO_WRITE, BIO_DELETE and BIO_FLUSH
requests as well as number of activemap updates. Number of BIO_WRITEs and activemap updates are especially interesting, because if those two are too close to each other, it means that your workload needs bigger number of dirty extents. Activemap should be updated as rarely as possible. MFC after: 1 week
Diffstat (limited to 'sbin/hastctl')
-rw-r--r--sbin/hastctl/hastctl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sbin/hastctl/hastctl.c b/sbin/hastctl/hastctl.c
index c4cd6a4..2f8a6eb 100644
--- a/sbin/hastctl/hastctl.c
+++ b/sbin/hastctl/hastctl.c
@@ -341,6 +341,17 @@ control_status(struct nv *nv)
printf(" dirty: %ju (%NB)\n",
(uintmax_t)nv_get_uint64(nv, "dirty%u", ii),
(intmax_t)nv_get_uint64(nv, "dirty%u", ii));
+ printf(" statistics:\n");
+ printf(" reads: %ju\n",
+ (uint64_t)nv_get_uint64(nv, "stat_read%u", ii));
+ printf(" writes: %ju\n",
+ (uint64_t)nv_get_uint64(nv, "stat_write%u", ii));
+ printf(" deletes: %ju\n",
+ (uint64_t)nv_get_uint64(nv, "stat_delete%u", ii));
+ printf(" flushes: %ju\n",
+ (uint64_t)nv_get_uint64(nv, "stat_flush%u", ii));
+ printf(" activemap updates: %ju\n",
+ (uint64_t)nv_get_uint64(nv, "stat_activemap_update%u", ii));
}
return (ret);
}
OpenPOWER on IntegriCloud