]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: allow 'ops' as shorthand for 'dump_ops_in_flight'
authorSage Weil <sage@redhat.com>
Thu, 8 Jan 2015 18:36:15 +0000 (10:36 -0800)
committerSage Weil <sage@redhat.com>
Thu, 8 Jan 2015 18:36:15 +0000 (10:36 -0800)
This is an extremely annoying thing to type when working with a
production cluster.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc

index ac0c9c749b208c1e6f69bd9a837b6b508581107e..318a750727f6325d985d8859ef87a8a01c02df7c 100644 (file)
@@ -1644,7 +1644,8 @@ bool OSD::asok_command(string command, cmdmap_t& cmdmap, string format,
     f->close_section();
   } else if (command == "flush_journal") {
     store->sync_and_flush();
-  } else if (command == "dump_ops_in_flight") {
+  } else if (command == "dump_ops_in_flight" ||
+            command == "ops") {
     op_tracker.dump_ops_in_flight(f);
   } else if (command == "dump_historic_ops") {
     op_tracker.dump_historic_ops(f);
@@ -1950,6 +1951,10 @@ void OSD::final_init()
                                     "dump_ops_in_flight", asok_hook,
                                     "show the ops currently in flight");
   assert(r == 0);
+  r = admin_socket->register_command("ops",
+                                    "ops", asok_hook,
+                                    "show the ops currently in flight");
+  assert(r == 0);
   r = admin_socket->register_command("dump_historic_ops", "dump_historic_ops",
                                     asok_hook,
                                     "show slowest recent ops");
@@ -2252,6 +2257,7 @@ int OSD::shutdown()
   cct->get_admin_socket()->unregister_command("status");
   cct->get_admin_socket()->unregister_command("flush_journal");
   cct->get_admin_socket()->unregister_command("dump_ops_in_flight");
+  cct->get_admin_socket()->unregister_command("ops");
   cct->get_admin_socket()->unregister_command("dump_historic_ops");
   cct->get_admin_socket()->unregister_command("dump_op_pq_state");
   cct->get_admin_socket()->unregister_command("dump_blacklist");