From: Sage Weil Date: Wed, 6 Aug 2014 17:45:00 +0000 (-0700) Subject: rados: fix {read,write}_bytes value X-Git-Tag: v0.84~18^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5663f91b600749a701cf040b8040c2d81adea3d9;p=ceph.git rados: fix {read,write}_bytes value Fill this in with kb * 1024 instead of the ops count. Backport: firefly, dumpling Signed-off-by: Sage Weil --- diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 49d5553b6bc3..cf18cab11908 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -20,3 +20,6 @@ v0.83 OSDs will still maintain the following osd-specific defaults: leveldb_log = "" + +* The 'rados df --format=json' output 'read_bytes' and 'write_bytes' + fields were incorrectly reporting ops; this is now fixed. diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index 0bc21d642f9c..1c2ab670b26a 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -1487,11 +1487,11 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts, formatter->dump_format("num_objects_unfound", "%lld", s.num_objects_unfound); formatter->dump_format("num_objects_degraded", "%lld", s.num_objects_degraded); formatter->dump_format("read_ops", "%lld", s.num_rd); - formatter->dump_format("read_bytes", "%lld", s.num_rd); + formatter->dump_format("read_bytes", "%lld", s.num_rd_kb * 1024ull); formatter->dump_format("read_kb", "%lld", s.num_rd_kb); - formatter->dump_format("write_bytes", "%lld", s.num_wr); formatter->dump_format("write_kb", "%lld", s.num_wr_kb); formatter->dump_format("write_ops", "%lld", s.num_wr); + formatter->dump_format("write_bytes", "%lld", s.num_wr_kb * 1024ull); formatter->flush(cout); } if (formatter) {