op_tracker.dump_ops_in_flight(ss);
} else if (command == "dump_historic_ops") {
op_tracker.dump_historic_ops(ss);
+ } else if (command == "dump_op_pq_state") {
+ JSONFormatter f(true);
+ f.open_object_section("pq");
+ op_wq.dump(&f);
+ f.close_section();
+ f.flush(ss);
} else {
assert(0 == "broken asok registration");
}
"show the ops currently in flight");
r = admin_socket->register_command("dump_historic_ops", asok_hook,
"show slowest recent ops");
+ r = admin_socket->register_command("dump_op_pq_state", asok_hook,
+ "dump op priority queue state");
assert(r == 0);
service.init();
cct->get_admin_socket()->unregister_command("dump_ops_in_flight");
cct->get_admin_socket()->unregister_command("dump_historic_ops");
+ cct->get_admin_socket()->unregister_command("dump_op_pq_state");
delete asok_hook;
asok_hook = NULL;
o->cct->_conf->osd_op_pq_min_cost)
{}
+ void dump(Formatter *f) {
+ Mutex::Locker l(qlock);
+ pqueue.dump(f);
+ }
+
void _enqueue_front(pair<PGRef, OpRequestRef> item);
void _enqueue(pair<PGRef, OpRequestRef> item);
PGRef _dequeue();