From: Zhiqiang Wang Date: Tue, 11 Aug 2015 07:36:08 +0000 (+0800) Subject: mon: show number of PGs in flush/evict mode in command line X-Git-Tag: v9.1.0~335^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9e58c628df6f95f4005499108dcdf00365abd15f;p=ceph.git mon: show number of PGs in flush/evict mode in command line Show the number of PGs in the high/low flush mode and some/full evict mode in the output of 'ceph -s' and 'ceph osd pool stats'. Signed-off-by: Zhiqiang Wang Suggested-by: Nick Fisk --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index a564d71784db..2ebf8d7aab70 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -1239,6 +1239,46 @@ void PGMap::cache_io_rate_summary(Formatter *f, ostream *out, have_output = true; } } + if (pos_delta.stats.sum.num_flush_mode_low) { + if (f) { + f->dump_int("num_flush_mode_low", pos_delta.stats.sum.num_flush_mode_low); + } else { + if (have_output) + *out << ", "; + *out << pretty_si_t(pos_delta.stats.sum.num_flush_mode_low) << "PG(s) flushing"; + have_output = true; + } + } + if (pos_delta.stats.sum.num_flush_mode_high) { + if (f) { + f->dump_int("num_flush_mode_high", pos_delta.stats.sum.num_flush_mode_high); + } else { + if (have_output) + *out << ", "; + *out << pretty_si_t(pos_delta.stats.sum.num_flush_mode_high) << "PG(s) flushing (high)"; + have_output = true; + } + } + if (pos_delta.stats.sum.num_evict_mode_some) { + if (f) { + f->dump_int("num_evict_mode_some", pos_delta.stats.sum.num_evict_mode_some); + } else { + if (have_output) + *out << ", "; + *out << pretty_si_t(pos_delta.stats.sum.num_evict_mode_some) << "PG(s) evicting"; + have_output = true; + } + } + if (pos_delta.stats.sum.num_evict_mode_full) { + if (f) { + f->dump_int("num_evict_mode_full", pos_delta.stats.sum.num_evict_mode_full); + } else { + if (have_output) + *out << ", "; + *out << pretty_si_t(pos_delta.stats.sum.num_evict_mode_full) << "PG(s) evicting (full)"; + have_output = true; + } + } } void PGMap::overall_cache_io_rate_summary(Formatter *f, ostream *out) const