From: John Spray Date: Thu, 4 Aug 2016 14:04:43 +0000 (+0100) Subject: mgr: expose osd stats from pgmap X-Git-Tag: v11.0.1~60^2~23 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7122fac0a55f700741f82607b0c68babb6a66b3d;p=ceph.git mgr: expose osd stats from pgmap Signed-off-by: John Spray --- diff --git a/src/mgr/PyModules.cc b/src/mgr/PyModules.cc index 4cbaccfae7aa..8c1fe867b02b 100644 --- a/src/mgr/PyModules.cc +++ b/src/mgr/PyModules.cc @@ -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;