]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMap: show rd/wr iops separately in status reports 7072/head
authorCilang Zhao <zhao.cilang@h3c.com>
Tue, 29 Dec 2015 08:56:35 +0000 (16:56 +0800)
committerCilang Zhao <zhao.cilang@h3c.com>
Thu, 31 Dec 2015 01:00:56 +0000 (09:00 +0800)
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 <zhao.cilang@h3c.com>
src/mon/PGMap.cc

index 6eb8b33d7995209f822f5eca41764378d2864d87..15df7f86f80ac4fd6a0a6588546c1c35d99848ab 100644 (file)
@@ -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";
     }
   }
 }