From: Sage Weil Date: Fri, 16 Jan 2015 21:34:18 +0000 (-0800) Subject: mon/OSDMonitor: pull totals into the table format X-Git-Tag: v0.93~227^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b5e1bd1fab4bd4aae768b72ab75f46df78758c04;p=ceph.git mon/OSDMonitor: pull totals into the table format Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 003fa57ec3ec..b55dc5e39100 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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();