]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: pull totals into the table format 3393/head
authorSage Weil <sage@redhat.com>
Fri, 16 Jan 2015 21:34:18 +0000 (13:34 -0800)
committerSage Weil <sage@redhat.com>
Sun, 18 Jan 2015 01:14:48 +0000 (17:14 -0800)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/OSDMonitor.cc

index 003fa57ec3eca5c35a1804ab80fa20139c76f883..b55dc5e391008ec8bd55c26122c9dbbf3b5ce2a4 100644 (file)
@@ -732,6 +732,14 @@ public:
     Parent::dump(tbl);
 
     dump_stray(tbl);
+
+    *tbl << "" << "" << "TOTAL"
+        << si_t(pgm->osd_sum.kb)
+        << si_t(pgm->osd_sum.kb_used << 10)
+        << si_t(pgm->osd_sum.kb_avail << 10)
+        << lowprecision_t(average_util)
+        << ""
+        << TextTable::endrow;
   }
 
 protected:
@@ -773,11 +781,7 @@ protected:
 public:
   string summary() {
     ostringstream out;
-    out << "TOTAL SIZE/USED/AVAIL: " << si_t(pgm->osd_sum.kb)
-       << "/" << si_t(pgm->osd_sum.kb_used << 10)
-       << "/" << si_t(pgm->osd_sum.kb_avail << 10) << "\n"
-       << "AVG %USE: " << lowprecision_t(average_util) << "  "
-       << "MIN/MAX VAR: " << lowprecision_t(min_var)
+    out << "MIN/MAX VAR: " << lowprecision_t(min_var)
        << "/" << lowprecision_t(max_var) << "  "
        << "STDDEV: " << lowprecision_t(dev());
     return out.str();