From b5e1bd1fab4bd4aae768b72ab75f46df78758c04 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 16 Jan 2015 13:34:18 -0800 Subject: [PATCH] mon/OSDMonitor: pull totals into the table format Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 003fa57ec3eca..b55dc5e391008 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(); -- 2.39.5