| 7456 | }; |
| 7457 | |
| 7458 | void print_osd_utilization(const OSDMap& osdmap, |
| 7459 | const PGMap& pgmap, |
| 7460 | ostream& out, |
| 7461 | Formatter *f, |
| 7462 | bool tree, |
| 7463 | const string& filter) |
| 7464 | { |
| 7465 | const CrushWrapper *crush = osdmap.crush.get(); |
| 7466 | if (f) { |
| 7467 | f->open_object_section("df"); |
| 7468 | OSDUtilizationFormatDumper d(crush, &osdmap, pgmap, tree, filter); |
| 7469 | d.dump(f); |
| 7470 | d.summary(f); |
| 7471 | f->close_section(); |
| 7472 | f->flush(out); |
| 7473 | } else { |
| 7474 | OSDUtilizationPlainDumper d(crush, &osdmap, pgmap, tree, filter); |
| 7475 | TextTable tbl; |
| 7476 | d.dump(&tbl); |
| 7477 | out << tbl << d.summary() << "\n"; |
| 7478 | } |
| 7479 | } |
| 7480 | |
| 7481 | void OSDMap::check_health(CephContext *cct, |
| 7482 | health_check_map_t *checks) const |