From: Cilang Zhao Date: Tue, 29 Dec 2015 08:56:35 +0000 (+0800) Subject: mon/PGMap: show rd/wr iops separately in status reports X-Git-Tag: v10.0.3~94^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F7072%2Fhead;p=ceph.git mon/PGMap: show rd/wr iops separately in status reports When check the iops, we always do not focuns on the total iops, but read iops and write iops. So the iops should be showed separately. Signed-off-by: Cilang Zhao --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index 6eb8b33d799..15df7f86f80 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -1178,11 +1178,13 @@ void PGMap::client_io_rate_summary(Formatter *f, ostream *out, *out << pretty_si_t(wr) << "B/s wr, "; } } - int64_t iops = (pos_delta.stats.sum.num_rd + pos_delta.stats.sum.num_wr) / (double)delta_stamp; + int64_t iops_rd = pos_delta.stats.sum.num_rd / (double)delta_stamp; + int64_t iops_wr = pos_delta.stats.sum.num_wr / (double)delta_stamp; if (f) { - f->dump_int("op_per_sec", iops); + f->dump_int("read_op_per_sec", iops_rd); + f->dump_int("write_op_per_sec", iops_wr); } else { - *out << pretty_si_t(iops) << "op/s"; + *out << pretty_si_t(iops_rd) << "op/s rd, " << pretty_si_t(iops_wr) << "op/s wr"; } } }