Skip to content

Commit

Permalink
[MON] Fixed calculation of %USED. Now it is shows (space used by all …
Browse files Browse the repository at this point in the history
…replicas)/(raw space available on OSDs). Before it was (size of pool)/(raw space available on OSDs).

Signed-off-by: Adam Kupczyk akupczyk@mirantis.com
(cherry picked from commit 71c4e52)
  • Loading branch information
Adam Kupczyk authored and dzafman committed May 16, 2016
1 parent fed256e commit 3184998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mon/PGMonitor.cc
Expand Up @@ -1276,7 +1276,7 @@ void PGMonitor::dump_object_stat_sum(TextTable &tbl, Formatter *f,
int64_t kb_used = SHIFT_ROUND_UP(sum.num_bytes, 10);
float used = 0.0;
if (pg_map.osd_sum.kb > 0)
used = (float)kb_used / pg_map.osd_sum.kb;
used = (float)kb_used * raw_used_rate * curr_object_copies_rate / pg_map.osd_sum.kb;
tbl << percentify(used*100);
tbl << si_t(avail);
tbl << sum.num_objects;
Expand Down

0 comments on commit 3184998

Please sign in to comment.