]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: allow 'ops' as shorthand for 'dump_ops_in_flight' 3325/head
authorSage Weil <sage@redhat.com>
Thu, 8 Jan 2015 18:36:22 +0000 (10:36 -0800)
committerSage Weil <sage@redhat.com>
Thu, 8 Jan 2015 18:36:22 +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/mds/MDS.cc

index 8c104c4a328f8072a4ab1bea092d0cfaa04c7837..e1774797f50bd4926241ab2f146738ba8688e3d2 100644 (file)
@@ -241,7 +241,8 @@ bool MDS::asok_command(string command, cmdmap_t& cmdmap, string format,
     if (whoami < 0) {
       dout(1) << "Can't run that command on an inactive MDS!" << dendl;
       f->dump_string("error", "mds_not_active");
-    } 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);
@@ -493,6 +494,10 @@ void MDS::set_up_admin_socket()
                                     "dump_ops_in_flight", asok_hook,
                                     "show the ops currently in flight");
   assert(0 == r);
+  r = admin_socket->register_command("ops",
+                                    "ops", asok_hook,
+                                    "show the ops currently in flight");
+  assert(0 == r);
   r = admin_socket->register_command("dump_historic_ops", "dump_historic_ops",
                                     asok_hook,
                                     "show slowest recent ops");
@@ -537,6 +542,7 @@ void MDS::clean_up_admin_socket()
   AdminSocket *admin_socket = g_ceph_context->get_admin_socket();
   admin_socket->unregister_command("status");
   admin_socket->unregister_command("dump_ops_in_flight");
+  admin_socket->unregister_command("ops");
   admin_socket->unregister_command("dump_historic_ops");
   admin_socket->unregister_command("scrub_path");
   admin_socket->unregister_command("flush_path");