From 7b2d0920681fbfe6f7d60bb9b696986dc3b334d5 Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Thu, 29 Nov 2018 16:56:08 +0300 Subject: [PATCH] mon/PGMap: Partially unify 'ceph pg stat' output with 'ceph df' Global stats parameter (like 'available' or 'total') are dumped under the same names now). Signed-off-by: Igor Fedotov --- PendingReleaseNotes | 9 +++++++++ src/mon/PGMap.cc | 9 +++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 18314b796f1b6..cc7b5b69ac769 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -1,6 +1,15 @@ 14.0.1 ------ +* ceph pg stat output has been modified in json + format to match ceph df output: + * "raw_bytes" field renamed to "total_bytes" + * "raw_bytes_avail" field renamed to "total_bytes_avail" + * "raw_bytes_avail" field renamed to "total_bytes_avail" + * "raw_bytes_used" field renamed to "total_bytes_raw_used" + * "total_bytes_used" field added to represent the space (accumulated over + all OSDs) allocated purely for data objects kept at block(slow) device + * ceph df [detail] output (GLOBAL section) has been modified in plain format: * new 'USED' column shows the space (accumulated over all OSDs) allocated diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index 5a7cdcbc7d443..5eaf9291662b9 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -340,15 +340,16 @@ void PGMapDigest::print_oneline_summary(Formatter *f, ostream *out) const *out << num_pg << " pgs: " << states << "; " << byte_u_t(pg_sum.stats.sum.num_bytes) << " data, " - << byte_u_t(osd_sum.statfs.get_used_raw()) << " used, " + << byte_u_t(osd_sum.statfs.get_used()) << " used, " << byte_u_t(osd_sum.statfs.available) << " / " << byte_u_t(osd_sum.statfs.total) << " avail"; if (f) { f->dump_unsigned("num_pgs", num_pg); f->dump_unsigned("num_bytes", pg_sum.stats.sum.num_bytes); - f->dump_unsigned("raw_bytes_used", osd_sum.statfs.get_used_raw()); - f->dump_unsigned("raw_bytes_avail", osd_sum.statfs.available); - f->dump_unsigned("raw_bytes", osd_sum.statfs.total); + f->dump_int("total_bytes", osd_sum.statfs.total); + f->dump_int("total_avail_bytes", osd_sum.statfs.available); + f->dump_int("total_used_bytes", osd_sum.statfs.get_used()); + f->dump_int("total_used_raw_bytes", osd_sum.statfs.get_used_raw()); } // make non-negative; we can get negative values if osds send -- 2.39.5