]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: expose osd stats from pgmap
authorJohn Spray <john.spray@redhat.com>
Thu, 4 Aug 2016 14:04:43 +0000 (15:04 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 29 Sep 2016 16:27:04 +0000 (17:27 +0100)
Signed-off-by: John Spray <john.spray@redhat.com>
src/mgr/PyModules.cc

index 4cbaccfae7aa5dd98880fa6f4d984ed40a0b2fe9..8c1fe867b02be8ff292b5556ce2e5885d72316da 100644 (file)
@@ -228,6 +228,13 @@ PyObject *PyModules::get_python(const std::string &what)
       });
     });
     return f.get();
+  } else if (what == "osd_stats") {
+    PyFormatter f;
+    cluster_state.with_pgmap(
+        [&f](const PGMap &pg_map) {
+      pg_map.dump_osd_stats(&f);
+    });
+    return f.get();
   } else if (what == "health" || what == "mon_status") {
     PyFormatter f;
     bufferlist json;