From: Zhiqiang Wang Date: Mon, 20 Jul 2015 03:31:47 +0000 (+0800) Subject: mon: add the cache tier IO rate in 'ceph -s' X-Git-Tag: v9.1.0~422^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f6763998f30d774c7c50dedf77bbb4f1b208f86d;p=ceph.git mon: add the cache tier IO rate in 'ceph -s' This will show the cache tier flush/evict bandwidth and promote IOPS in the output of the 'ceph -s' command. Signed-off-by: Zhiqiang Wang --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index 261dd71fb5ea..2c08fcc1da6e 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -1224,6 +1224,11 @@ void PGMap::cache_io_rate_summary(Formatter *f, ostream *out, } } +void PGMap::overall_cache_io_rate_summary(Formatter *f, ostream *out) const +{ + cache_io_rate_summary(f, out, pg_sum_delta, stamp_delta); +} + void PGMap::pool_cache_io_rate_summary(Formatter *f, ostream *out, uint64_t poolid) const { @@ -1423,6 +1428,13 @@ void PGMap::print_summary(Formatter *f, ostream *out) const overall_client_io_rate_summary(f, &ssr); if (!f && ssr.str().length()) *out << " client io " << ssr.str() << "\n"; + + ssr.clear(); + ssr.str(""); + + overall_cache_io_rate_summary(f, &ssr); + if (!f && ssr.str().length()) + *out << " cache io " << ssr.str() << "\n"; } void PGMap::print_oneline_summary(Formatter *f, ostream *out) const diff --git a/src/mon/PGMap.h b/src/mon/PGMap.h index b89e52a5c344..e1cdf2dea3c9 100644 --- a/src/mon/PGMap.h +++ b/src/mon/PGMap.h @@ -341,6 +341,11 @@ public: void cache_io_rate_summary(Formatter *f, ostream *out, const pool_stat_t& delta_sum, utime_t delta_stamp) const; + /** + * Obtain a formatted/plain output for the overall cache tier IO, which is + * calculated resorting to @p pg_sum_delta and @p stamp_delta. + */ + void overall_cache_io_rate_summary(Formatter *f, ostream *out) const; /** * Obtain a formatted/plain output for cache tier IO over a given pool * with id @p pool_id. We will then obtain pool-specific data