]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMap: Partially unify 'ceph pg stat' output with 'ceph df' 19454/head
authorIgor Fedotov <ifedotov@suse.com>
Thu, 29 Nov 2018 13:56:08 +0000 (16:56 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Thu, 6 Dec 2018 15:54:21 +0000 (18:54 +0300)
Global stats parameter (like 'available' or 'total') are dumped under the
same names now).

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
PendingReleaseNotes
src/mon/PGMap.cc

index 18314b796f1b6053569c7c219e16df69ef51e0b1..cc7b5b69ac769ea9c67b05357267886aa0787f5b 100644 (file)
@@ -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
index 5a7cdcbc7d4434958f95ef05ae9f74129a3558a2..5eaf9291662b9264d315f514835d5cc41519827f 100644 (file)
@@ -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