]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMap: include the per-pool usage breakdown in pg dump 39728/head
authorSage Weil <sage@newdream.net>
Fri, 26 Feb 2021 01:58:27 +0000 (19:58 -0600)
committerSage Weil <sage@newdream.net>
Fri, 26 Feb 2021 01:58:27 +0000 (19:58 -0600)
We started accounting for this ages ago, but we don't expose it anywhere.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/PGMap.cc

index 4b8a79c0bdf65607275f6964211be2776b3f90b7..6b4a1935e51ddbcdd37494c54241bffff9fbf015 100644 (file)
@@ -1621,6 +1621,16 @@ void PGMap::dump_osd_stats(ceph::Formatter *f, bool with_net) const
     f->close_section();
   }
   f->close_section();
+
+  f->open_array_section("pool_statfs");
+  for (auto& p : pool_statfs) {
+    f->open_object_section("item");
+    f->dump_int("poolid", p.first.first);
+    f->dump_int("osd", p.first.second);
+    p.second.dump(f);
+    f->close_section();
+  }
+  f->close_section();
 }
 
 void PGMap::dump_osd_ping_times(ceph::Formatter *f) const