From 7122fac0a55f700741f82607b0c68babb6a66b3d Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 4 Aug 2016 15:04:43 +0100 Subject: [PATCH] mgr: expose osd stats from pgmap Signed-off-by: John Spray --- src/mgr/PyModules.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mgr/PyModules.cc b/src/mgr/PyModules.cc index 4cbaccfae7a..8c1fe867b02 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; -- 2.47.3