mirror of
https://github.com/ceph/ceph
synced 2025-04-11 04:02:04 +00:00
mon/PGMap: use num_pg where available
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
39d524a433
commit
08bd81fa10
@ -1640,7 +1640,7 @@ void PGMap::print_summary(Formatter *f, ostream *out) const
|
|||||||
f->close_section();
|
f->close_section();
|
||||||
|
|
||||||
if (f) {
|
if (f) {
|
||||||
f->dump_unsigned("num_pgs", pg_stat.size());
|
f->dump_unsigned("num_pgs", num_pg);
|
||||||
f->dump_unsigned("num_pools", pg_pool_sum.size());
|
f->dump_unsigned("num_pools", pg_pool_sum.size());
|
||||||
f->dump_unsigned("num_objects", pg_sum.stats.sum.num_objects);
|
f->dump_unsigned("num_objects", pg_sum.stats.sum.num_objects);
|
||||||
f->dump_unsigned("data_bytes", pg_sum.stats.sum.num_bytes);
|
f->dump_unsigned("data_bytes", pg_sum.stats.sum.num_bytes);
|
||||||
@ -1649,7 +1649,7 @@ void PGMap::print_summary(Formatter *f, ostream *out) const
|
|||||||
f->dump_unsigned("bytes_total", osd_sum.kb * 1024ull);
|
f->dump_unsigned("bytes_total", osd_sum.kb * 1024ull);
|
||||||
} else {
|
} else {
|
||||||
*out << " pools: " << pg_pool_sum.size() << " pools, "
|
*out << " pools: " << pg_pool_sum.size() << " pools, "
|
||||||
<< pg_stat.size() << " pgs\n";
|
<< num_pg << " pgs\n";
|
||||||
*out << " objects: " << si_t(pg_sum.stats.sum.num_objects) << " objects, "
|
*out << " objects: " << si_t(pg_sum.stats.sum.num_objects) << " objects, "
|
||||||
<< prettybyte_t(pg_sum.stats.sum.num_bytes) << "\n";
|
<< prettybyte_t(pg_sum.stats.sum.num_bytes) << "\n";
|
||||||
*out << " usage: "
|
*out << " usage: "
|
||||||
@ -1659,7 +1659,6 @@ void PGMap::print_summary(Formatter *f, ostream *out) const
|
|||||||
*out << " pgs: ";
|
*out << " pgs: ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool pad = false;
|
bool pad = false;
|
||||||
if (num_pg_active < num_pg) {
|
if (num_pg_active < num_pg) {
|
||||||
float p = (float)num_pg_active / (float)num_pg;
|
float p = (float)num_pg_active / (float)num_pg;
|
||||||
|
Loading…
Reference in New Issue
Block a user