.set_default(true)
.set_description("enable/disable MON op tracking"),
- Option("mon_op_complaint_time", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
+ Option("mon_op_complaint_time", Option::TYPE_SECS, Option::LEVEL_ADVANCED)
.set_default(30)
- .set_description("time in seconds to consider a MON OP blocked after no updates"),
+ .set_description("time after which to consider a monitor operation blocked "
+ "after no updates"),
Option("mon_op_log_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
.set_default(5)
.set_default(20)
.set_description("max number of completed ops to track"),
- Option("mon_op_history_duration", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
+ Option("mon_op_history_duration", Option::TYPE_SECS, Option::LEVEL_ADVANCED)
.set_default(600)
.set_description("expiration time in seconds of historical MON OPS"),
.set_default(20)
.set_description("max number of slow historical MON OPS to keep"),
- Option("mon_op_history_slow_op_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
- .set_default(10.0)
- .set_description("duration time in seconds of an op to be considered as a historical slow op"),
+ Option("mon_op_history_slow_op_threshold", Option::TYPE_SECS, Option::LEVEL_ADVANCED)
+ .set_default(10)
+ .set_description("duration of an op to be considered as a historical slow op"),
Option("mon_data", Option::TYPE_STR, Option::LEVEL_ADVANCED)
.set_flag(Option::FLAG_NO_MON_UPDATE)
update_log_clients();
- op_tracker.set_complaint_and_threshold(g_conf->get_val<double>("mon_op_complaint_time"),
- g_conf->get_val<int64_t>("mon_op_log_threshold"));
- op_tracker.set_history_size_and_duration(g_conf->get_val<uint64_t>("mon_op_history_size"),
- g_conf->get_val<uint64_t>("mon_op_history_duration"));
- op_tracker.set_history_slow_op_size_and_threshold(g_conf->get_val<uint64_t>("mon_op_history_slow_op_size"),
- g_conf->get_val<double>("mon_op_history_slow_op_threshold"));
+ op_tracker.set_complaint_and_threshold(
+ g_conf->get_val<std::chrono::seconds>("mon_op_complaint_time").count(),
+ g_conf->get_val<int64_t>("mon_op_log_threshold"));
+ op_tracker.set_history_size_and_duration(
+ g_conf->get_val<uint64_t>("mon_op_history_size"),
+ g_conf->get_val<std::chrono::seconds>("mon_op_history_duration").count());
+ op_tracker.set_history_slow_op_size_and_threshold(
+ g_conf->get_val<uint64_t>("mon_op_history_slow_op_size"),
+ g_conf->get_val<std::chrono::seconds>("mon_op_history_slow_op_threshold").count());
paxos = new Paxos(this, "paxos");
<< "from='admin socket' entity='admin socket' "
<< "cmd='" << command << "' args=" << args << ": dispatch";
- set<string> filters;
- vector<string> filter_str;
- if (cmd_getval(cct, cmdmap, "filterstr", filter_str)) {
- copy(filter_str.begin(), filter_str.end(),
- inserter(filters, filters.end()));
- }
-
-
if (command == "mon_status") {
get_mon_status(f.get(), ss);
if (f)
please enable \"mon_enable_op_tracker\", and the tracker will start to track new ops received afterwards.";
}
} else if (command == "dump_historic_slow_ops") {
- if (op_tracker.dump_historic_slow_ops(f.get(), filters)) {
+ if (op_tracker.dump_historic_slow_ops(f.get(), {})) {
f->flush(ss);
} else {
ss << "op_tracker tracking is not enabled now, so no ops are tracked currently, even those get stuck. \
utime_t oldest_secs;
const utime_t now = ceph_clock_now();
auto too_old = now;
- too_old -= g_conf->get_val<double>("mon_op_complaint_time");
+ too_old -= g_conf->get_val<std::chrono::seconds>("mon_op_complaint_time").count();
int slow = 0;
auto count_slow_ops = [&](TrackedOp& op) {