X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Futils%2Flctl.c;h=58cbae5f6f583123572d6b50410b43c963591a76;hb=f625f670afbe954030ff81f0f8522137d6cdd335;hp=3c4c0ad88e448dac49e23e627108695f9f10fc32;hpb=6703c0ee3391c8940445eb0f3421ffdf8d44b78e;p=fs%2Flustre-release.git diff --git a/lustre/utils/lctl.c b/lustre/utils/lctl.c index 3c4c0ad..58cbae5 100644 --- a/lustre/utils/lctl.c +++ b/lustre/utils/lctl.c @@ -1,41 +1,51 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: +/* + * GPL HEADER START * - * Copyright (C) 2002 Cluster File Systems, Inc. - * Author: Peter J. Braam - * Author: Phil Schwan - * Author: Robert Read + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * This file is part of Lustre, http://www.lustre.org. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 only, + * as published by the Free Software Foundation. * - * Lustre is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License version 2 for more details (a copy is included + * in the LICENSE file that accompanied this code). * - * Lustre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * version 2 along with this program; If not, see + * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * You should have received a copy of the GNU General Public License - * along with Lustre; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. * + * GPL HEADER END + */ +/* + * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Use is subject to license terms. + * + * Copyright (c) 2012, 2014, Intel Corporation. + */ +/* + * This file is part of Lustre, http://www.lustre.org/ + * Lustre is a trademark of Sun Microsystems, Inc. + * + * lustre/utils/lctl.c + * + * Author: Peter J. Braam + * Author: Phil Schwan + * Author: Robert Read */ - - #include #include -#include -#include +#include #include "obdctl.h" -#include "parser.h" - -static int jt_quit(int argc, char **argv) { - Parser_quit(argc, argv); - return 0; -} +#include +#include static int jt_noop(int argc, char **argv) { return 0; @@ -48,141 +58,331 @@ static int jt_opt_ignore_errors(int argc, char **argv) { command_t cmdlist[] = { /* Metacommands */ + {"===== metacommands =======", jt_noop, 0, "metacommands"}, {"--device", jt_opt_device, 0, "run after connecting to device \n" "--device "}, - {"--threads", jt_opt_threads, 0, - "run separate instances of on device \n" - "--threads "}, {"--ignore_errors", jt_opt_ignore_errors, 0, "ignore errors that occur during script processing\n" "--ignore_errors"}, {"ignore_errors", jt_opt_ignore_errors, 0, "ignore errors that occur during script processing\n" "ignore_errors"}, - {"dump", jt_ioc_dump, 0, "usage: dump file, save ioctl buffer to file"}, - /* Network configuration commands */ - {"==== network config ====", jt_noop, 0, "network config"}, - {"--net", jt_opt_net, 0, "run after setting network to \n" - "usage: --net "}, - {"network", jt_ptl_network, 0, "commands that follow apply to net\n" - "usage: network "}, - {"autoconn_list", jt_ptl_print_autoconnects, 0, "print autoconnect entries\n" - "usage: print_autoconns"}, - {"add_autoconn", jt_ptl_add_autoconnect, 0, "add an autoconnect entry\n" - "usage: add_autoconn [ise]"}, - {"del_autoconn", jt_ptl_del_autoconnect, 0, "remove an autoconnect entry\n" - "usage: del_autoconn [] [] [ks]"}, - {"conn_list", jt_ptl_print_connections, 0, "connect to a remote nid\n" - "usage: print_conns"}, - {"connect", jt_ptl_connect, 0, "connect to a remote nid\n" - "usage: connect [iIOC]"}, - {"disconnect", jt_ptl_disconnect, 0, "disconnect from a remote nid\n" - "usage: disconnect []"}, - {"active_tx", jt_ptl_print_active_txs, 0, "print active transmits (no args)\n" - "usage: active_tx"}, - {"mynid", jt_ptl_mynid, 0, "inform the socknal of the local nid. " - "The nid defaults to hostname for tcp networks and is automatically " - "setup for elan/myrinet/scimac networks.\n" - "usage: mynid []"}, - {"shownid", jt_ptl_shownid, 0, "print the local NID\n" - "usage: shownid"}, - {"add_uuid", jt_lcfg_add_uuid, 0, "associate a UUID with a nid\n" - "usage: add_uuid "}, - {"close_uuid", jt_obd_close_uuid, 0, "disconnect a UUID\n" - "usage: close_uuid )"}, - {"del_uuid", jt_lcfg_del_uuid, 0, "delete a UUID association\n" - "usage: del_uuid "}, - {"add_route", jt_ptl_add_route, 0, - "add an entry to the portals routing table\n" - "usage: add_route []"}, - {"del_route", jt_ptl_del_route, 0, - "delete the route via the given gateway to the given targets from the portals routing table\n" - "usage: del_route [] []"}, - {"set_route", jt_ptl_notify_router, 0, - "enable/disable routes via the given gateway in the portals routing table\n" - "usage: set_route [