diff options
author | Yehuda Sadeh <yehuda@hq.newdream.net> | 2011-09-02 14:21:11 -0700 |
---|---|---|
committer | Yehuda Sadeh <yehuda@hq.newdream.net> | 2011-09-02 14:21:11 -0700 |
commit | 8b9ca2a5401516ca48d722a052c9380bde1cd666 (patch) | |
tree | 0055653d1d58491546cef952b10c74838245acd8 | |
parent | b30e1577b542c7038efad59dd468fad26f17efa4 (diff) | |
download | ceph-8b9ca2a5401516ca48d722a052c9380bde1cd666.tar.gz |
rados tool: fix rados df formatting
-rw-r--r-- | src/rados.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rados.cc b/src/rados.cc index 39183357f07..1cadf2e8d94 100644 --- a/src/rados.cc +++ b/src/rados.cc @@ -753,6 +753,7 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts, "KB", "objects", "clones", "degraded", "unfound", "rd", "rd KB", "wr", "wr KB"); } else { + formatter->open_object_section("stats"); formatter->open_array_section("pools"); } for (map<string, librados::stats_map>::iterator c = stats.begin(); c != stats.end(); ++c) { @@ -825,6 +826,7 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts, printf(" total avail %12lld\n", (long long unsigned)tstats.kb_avail); printf(" total space %12lld\n", (long long unsigned)tstats.kb); } else { + formatter->close_section(); formatter->dump_format("total_objects", "%lld", (long long unsigned)tstats.num_objects); formatter->dump_format("total_used", "%lld", (long long unsigned)tstats.kb_used); formatter->dump_format("total_avail", "%lld", (long long unsigned)tstats.kb_avail); |