]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: show number of PGs in flush/evict mode in command line 5539/head
authorZhiqiang Wang <zhiqiang.wang@intel.com>
Tue, 11 Aug 2015 07:36:08 +0000 (15:36 +0800)
committerZhiqiang Wang <zhiqiang.wang@intel.com>
Thu, 13 Aug 2015 02:47:16 +0000 (10:47 +0800)
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 <zhiqiang.wang@intel.com>
Suggested-by: Nick Fisk <nick@fisk.me.uk>
src/mon/PGMap.cc

index a564d71784db13b335de563bffee02255da8618c..2ebf8d7aab70f1e6e53b4415b51afc3f7a77e878 100644 (file)
@@ -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