We're about to make print_summary() do something much nicer.
Signed-off-by: Sage Weil <sage@inktank.com>
}
}
+void OSDMap::print_oneline_summary(ostream& out) const
+{
+ out << "e" << get_epoch() << ": "
+ << get_num_osds() << " osds: "
+ << get_num_up_osds() << " up, "
+ << get_num_in_osds() << " in";
+ if (test_flag(CEPH_OSDMAP_FULL))
+ out << " full";
+ else if (test_flag(CEPH_OSDMAP_NEARFULL))
+ out << " nearfull";
+}
+
bool OSDMap::crush_ruleset_in_use(int ruleset) const
{
for (map<int64_t,pg_pool_t>::const_iterator p = pools.begin(); p != pools.end(); ++p) {
public:
void print(ostream& out) const;
void print_summary(Formatter *f, ostream& out) const;
+ void print_oneline_summary(ostream& out) const;
void print_tree(ostream *out, Formatter *f) const;
string get_flag_string() const;
typedef std::tr1::shared_ptr<const OSDMap> OSDMapRef;
inline ostream& operator<<(ostream& out, const OSDMap& m) {
- m.print_summary(NULL, out);
+ m.print_oneline_summary(out);
return out;
}