From 05c60f004d9759051e9667f61afceb2c5373708d Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Tue, 29 Aug 2017 12:36:34 +0800 Subject: [PATCH] mon/PGMap: nice numbers for 'data' section of 'ceph df' command Was: --------------------------------------------------- data: pools: 3 pools, 32 pgs objects: 311 objects, 1156 MB usage: 10024 MB used, 51799 MB / 61823 MB avail pgs: 32 active+clean Now: --------------------------------------------------- data: pools: 3 pools, 32 pgs objects: 311 objects, 1.13G usage: 9.78G used, 50.6G / 60.4G avail pgs: 32 active+clean Signed-off-by: xie xingguo --- src/mon/PGMap.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index 0268bc78267..42c6d128985 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -172,11 +172,11 @@ void PGMapDigest::print_summary(Formatter *f, ostream *out) const *out << " pools: " << pg_pool_sum.size() << " pools, " << num_pg << " pgs\n"; *out << " objects: " << si_t(pg_sum.stats.sum.num_objects) << " objects, " - << prettybyte_t(pg_sum.stats.sum.num_bytes) << "\n"; + << si_t(pg_sum.stats.sum.num_bytes) << "\n"; *out << " usage: " - << kb_t(osd_sum.kb_used) << " used, " - << kb_t(osd_sum.kb_avail) << " / " - << kb_t(osd_sum.kb) << " avail\n"; + << si_t(osd_sum.kb_used << 10) << " used, " + << si_t(osd_sum.kb_avail << 10) << " / " + << si_t(osd_sum.kb << 10) << " avail\n"; *out << " pgs: "; }