From: huangjun Date: Wed, 26 Oct 2016 03:40:05 +0000 (+0800) Subject: mon: print the num_pools and num_objects in 'ceph -s -f json/json-pretty'. X-Git-Tag: v11.1.0~480^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bf2b50ef957f4f1f55e05deeed7aaa13f56a1105;p=ceph.git mon: print the num_pools and num_objects in 'ceph -s -f json/json-pretty'. Fixes: http://tracker.ceph.com/issues/17703 Signed-off-by: huangjun --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index cd59129dec1..ac97d9d280a 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -1594,6 +1594,8 @@ void PGMap::print_summary(Formatter *f, ostream *out) const if (f) { f->dump_unsigned("version", version); f->dump_unsigned("num_pgs", pg_stat.size()); + f->dump_unsigned("num_pools", pg_pool_sum.size()); + f->dump_unsigned("num_objects", pg_sum.stats.sum.num_objects); f->dump_unsigned("data_bytes", pg_sum.stats.sum.num_bytes); f->dump_unsigned("bytes_used", osd_sum.kb_used * 1024ull); f->dump_unsigned("bytes_avail", osd_sum.kb_avail * 1024ull);