From b5a7260ae8f96c3ff9a9948dacc4f17a46943d00 Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Fri, 30 May 2014 07:45:37 -0500 Subject: [PATCH] LU-2675 utils: remove unused utilities Remove the unused lnet utilities: debugctl, lstclient, and ptlctl. Remove the unused lustre utilities: lrun, lshowmount, module_cleanup.sh, obdctl, and rmmod_all.sh. Signed-off-by: John L. Hammond Change-Id: I7797f9b1be267ad36bdcd50848cb0e1e656c3c41 Reviewed-on: http://review.whamcloud.com/10510 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Liang Zhen Reviewed-by: James Simmons Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin --- lnet/utils/.gitignore | 3 - lnet/utils/Makefile.am | 44 +---- lnet/utils/debugctl.c | 76 ------- lnet/utils/lstclient.c | 284 --------------------------- lnet/utils/pthread/.gitignore | 2 - lnet/utils/ptlctl.c | 83 -------- lustre/doc/Makefile.am | 2 +- lustre/doc/lshowmount.8 | 43 ---- lustre/doc/lst.8 | 18 +- lustre/doc/lustre.7 | 1 - lustre/utils/.gitignore | 1 - lustre/utils/Makefile.am | 5 +- lustre/utils/automatic-reconnect-sample | 34 ---- lustre/utils/lrun | 17 -- lustre/utils/lshowmount.c | 223 --------------------- lustre/utils/module_cleanup.sh | 23 --- lustre/utils/nidlist.c | 338 -------------------------------- lustre/utils/nidlist.h | 54 ----- lustre/utils/obdctl.c | 118 ----------- lustre/utils/pthread/.gitignore | 4 - lustre/utils/rmmod_all.sh | 14 -- 21 files changed, 8 insertions(+), 1379 deletions(-) delete mode 100644 lnet/utils/debugctl.c delete mode 100644 lnet/utils/lstclient.c delete mode 100644 lnet/utils/pthread/.gitignore delete mode 100644 lnet/utils/ptlctl.c delete mode 100644 lustre/doc/lshowmount.8 delete mode 100755 lustre/utils/automatic-reconnect-sample delete mode 100755 lustre/utils/lrun delete mode 100644 lustre/utils/lshowmount.c delete mode 100755 lustre/utils/module_cleanup.sh delete mode 100644 lustre/utils/nidlist.c delete mode 100644 lustre/utils/nidlist.h delete mode 100644 lustre/utils/obdctl.c delete mode 100644 lustre/utils/pthread/.gitignore delete mode 100755 lustre/utils/rmmod_all.sh diff --git a/lnet/utils/.gitignore b/lnet/utils/.gitignore index f292723..138369d 100644 --- a/lnet/utils/.gitignore +++ b/lnet/utils/.gitignore @@ -1,8 +1,5 @@ /Makefile.in /acceptor -/debugctl -/ptlctl /routerstat /wirecheck /lst -/lstclient diff --git a/lnet/utils/Makefile.am b/lnet/utils/Makefile.am index f11a21a..dd7b9e4 100644 --- a/lnet/utils/Makefile.am +++ b/lnet/utils/Makefile.am @@ -41,44 +41,20 @@ LIBCFS= $(top_builddir)/libcfs/libcfs/libcfs.a LIBCFSUTIL= $(top_builddir)/libcfs/libcfs/libcfsutil.a -if LIBLUSTRE -noinst_LIBRARIES = libuptlctl.a -endif - -libuptlctl_a_SOURCES = portals.c debug.c -libuptlctl_a_CPPFLAGS = $(LLCPPFLAGS) -libuptlctl_a_CFLAGS = $(LLCFLAGS) -DLUSTRE_UTILS=1 - -sbin_PROGRAMS = debugctl - lib_LIBRARIES = libptlctl.a -if LIBLUSTRE -noinst_LIBRARIES += liblst.a -liblst_a_SOURCES = -endif - libptlctl_a_SOURCES = portals.c debug.c +sbin_PROGRAMS = + if UTILS -sbin_PROGRAMS += ptlctl routerstat wirecheck lst -if LIBLUSTRE -sbin_PROGRAMS += lstclient -endif +sbin_PROGRAMS += routerstat wirecheck lst endif wirecheck_SOURCES = wirecheck.c -ptlctl_SOURCES = ptlctl.c -ptlctl_LDADD = -L. -lptlctl $(LIBCFSUTIL) $(LIBCFS) $(LIBREADLINE) $(LIBEFENCE) -ptlctl_DEPENDENCIES = libptlctl.a - routerstat_SOURCES = routerstat.c -debugctl_SOURCES = debugctl.c -debugctl_LDADD = -L. -lptlctl $(LIBCFSUTIL) $(LIBREADLINE) $(LIBEFENCE) -debugctl_DEPENDENCIES = libptlctl.a - lst_SOURCES = lst.c lst_LDADD = -L. -lptlctl $(LIBCFSUTIL) $(LIBCFS) $(LIBREADLINE) $(LIBEFENCE) lst_DEPENDENCIES = libptlctl.a @@ -88,18 +64,4 @@ if BUILD_USOCKLND LND_LIBS += $(top_builddir)/lnet/ulnds/socklnd/libsocklnd.a endif -if LIBLUSTRE -LIB_SELFTEST = $(top_builddir)/libcfs/libcfs/libcfs.a $(top_builddir)/lnet/lnet/liblnet.a $(top_builddir)/lnet/selftest/libselftest.a - -export AR -export RANLIB - -liblst.a : $(LIB_SELFTEST) $(LND_LIBS) - sh $(srcdir)/genlib.sh "$(LIBS)" "$(LND_LIBS)" "$(PTHREAD_LIBS)" - -lstclient_SOURCES = lstclient.c -lstclient_LDADD = -L. -lptlctl -llst $(LIBREADLINE) $(LIBEFENCE) $(PTHREAD_LIBS) -lstclient_DEPENDENCIES = libptlctl.a liblst.a -endif - EXTRA_DIST = genlib.sh diff --git a/lnet/utils/debugctl.c b/lnet/utils/debugctl.c deleted file mode 100644 index 93c208f..0000000 --- a/lnet/utils/debugctl.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. - * - * This file is part of Portals, http://www.sf.net/projects/lustre/ - * - * Portals 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. - * - * Portals 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 - * along with Portals; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Some day I'll split all of this functionality into a cfs_debug module - * of its own. That day is not today. - */ - -#include -#include -#include -#include - - -command_t list[] = { - {"debug_kernel", jt_dbg_debug_kernel, 0, "usage: debug_kernel [file] [raw], get debug buffer and print it [to a file]"}, - {"debug_daemon", jt_dbg_debug_daemon, 0, "usage: debug_daemon [start file|stop], control debug daemon to dump debug buffer to a file"}, - {"debug_file", jt_dbg_debug_file, 0, "usage: debug_file [output] [raw], read debug buffer from input and print it [to output]"}, - {"clear", jt_dbg_clear_debug_buf, 0, "clear kernel debug buffer"}, - {"mark", jt_dbg_mark_debug_buf, 0, "insert a marker into the kernel debug buffer (args: [marker text])"}, - {"filter", jt_dbg_filter, 0, "filter certain messages (args: subsystem/debug ID)\n"}, - {"show", jt_dbg_show, 0, "enable certain messages (args: subsystem/debug ID)\n"}, - {"list", jt_dbg_list, 0, "list subsystem and debug types (args: subs or types)\n"}, - {"modules", jt_dbg_modules, 0, "provide gdb-friendly module info (arg: )"}, - {"panic", jt_dbg_panic, 0, "cause the kernel to panic"}, - {"dump", jt_ioc_dump, 0, "usage: dump file, save ioctl buffer to file"}, - {"help", Parser_help, 0, "help"}, - {"exit", Parser_quit, 0, "quit"}, - {"quit", Parser_quit, 0, "quit"}, - { 0, 0, 0, NULL } -}; - -int main(int argc, char **argv) -{ - int rc = 0; - - rc = libcfs_arch_init(); - if (rc < 0) - return rc; - - rc = dbg_initialize(argc, argv); - if (rc < 0) - goto errorout; - - register_ioc_dev(LNET_DEV_ID, LNET_DEV_PATH, - LNET_DEV_MAJOR, LNET_DEV_MINOR); - - Parser_init("debugctl > ", list); - if (argc > 1) { - rc = Parser_execarg(argc - 1, &argv[1], list); - unregister_ioc_dev(LNET_DEV_ID); - goto errorout; - } - - Parser_commands(); - - unregister_ioc_dev(LNET_DEV_ID); - -errorout: - libcfs_arch_cleanup(); - return rc; -} diff --git a/lnet/utils/lstclient.c b/lnet/utils/lstclient.c deleted file mode 100644 index e19c4be..0000000 --- a/lnet/utils/lstclient.c +++ /dev/null @@ -1,284 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * 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. - * - * 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). - * - * 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 - * - * 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) 2007, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2012, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * lnet/selftest/conctl.c - * - * Author: Liang Zhen - */ - -#include -#include -#include -#include -#include -#include -#include -#include "../selftest/rpc.h" -#include "../selftest/selftest.h" - -static int lstjn_stopping = 0; -static int lstjn_intialized = 0; - - -static struct option lstjn_options[] = -{ - {"sesid", required_argument, 0, 's' }, - {"group", required_argument, 0, 'g' }, - {"features", required_argument, 0, 'f' }, - {"server_mode", no_argument, 0, 'm' }, - {0, 0, 0, 0 } -}; - -void -lstjn_stop (int sig) -{ - lstjn_stopping = 1; -} - -void -lstjn_rpc_done(srpc_client_rpc_t *rpc) -{ - if (!lstjn_intialized) - lstjn_intialized = 1; -} - -int -lstjn_join_session(char *ses, char *grp, unsigned feats) -{ - lnet_process_id_t sesid; - srpc_client_rpc_t *rpc; - srpc_join_reqst_t *req; - srpc_join_reply_t *rep; - srpc_mksn_reqst_t *sreq; - srpc_mksn_reply_t *srep; - int rc; - - sesid.pid = LUSTRE_LNET_PID; - sesid.nid = libcfs_str2nid(ses); - if (sesid.nid == LNET_NID_ANY) { - fprintf(stderr, "Invalid session NID: %s\n", ses); - return -1; - } - - rpc = sfw_create_rpc(sesid, SRPC_SERVICE_JOIN, feats, - 0, 0, lstjn_rpc_done, NULL); - if (rpc == NULL) { - fprintf(stderr, "Out of memory\n"); - return -1; - } - - req = &rpc->crpc_reqstmsg.msg_body.join_reqst; - - req->join_sid = LST_INVALID_SID; - strncpy(req->join_group, grp, sizeof(req->join_group)); - req->join_group[sizeof(req->join_group) - 1] = '\0'; - - sfw_post_rpc(rpc); - - for (;;) { - rc = selftest_wait_events(); - - if (lstjn_intialized) - break; - } - - if (rpc->crpc_status != 0) { - fprintf(stderr, "Failed to send RPC to console: %s\n", - strerror(rpc->crpc_status)); - srpc_client_rpc_decref(rpc); - return -1; - } - - sfw_unpack_message(&rpc->crpc_replymsg); - - rep = &rpc->crpc_replymsg.msg_body.join_reply; - if (rep->join_status != 0) { - fprintf(stderr, "Can't join session %s group %s: %s\n", - ses, grp, strerror(rep->join_status)); - srpc_client_rpc_decref(rpc); - return -1; - } - - if (rpc->crpc_replymsg.msg_ses_feats != feats) { - /* this can only happen when connecting to old console - * which will ignore features */ - fprintf(stderr, "Can't join session %s group %s because " - "feature bits can't match: %x/%x, please set " - "feature bits by -f FEATURES and retry\n", - ses, grp, feats, rpc->crpc_replymsg.msg_ses_feats); - srpc_client_rpc_decref(rpc); - return -1; - } - - sreq = &rpc->crpc_reqstmsg.msg_body.mksn_reqst; - sreq->mksn_sid = rep->join_sid; - sreq->mksn_force = 0; - strcpy(sreq->mksn_name, rep->join_session); - - srep = &rpc->crpc_replymsg.msg_body.mksn_reply; - - rc = sfw_make_session(sreq, srep); - if (rc != 0 || srep->mksn_status != 0) { - fprintf(stderr, "Can't create session: %d, %s\n", - rc, strerror(srep->mksn_status)); - srpc_client_rpc_decref(rpc); - return -1; - } - - fprintf(stdout, "Session %s, ID: %s, "LPU64"\n", - ses, libcfs_nid2str(rep->join_sid.ses_nid), - rep->join_sid.ses_stamp); - - srpc_client_rpc_decref(rpc); - - return 0; -} - -int -main(int argc, char **argv) -{ - char *ses = NULL; - char *grp = NULL; - unsigned feats = LST_FEATS_MASK; - int server_mode_flag = 0; - int optidx; - int c; - int rc; - - const char *usage_string = - "Usage: lstclient --sesid ID --group GROUP " - "--features FEATURES [--server_mode]\n"; - - while (1) { - c = getopt_long(argc, argv, "s:g:f:m", - lstjn_options, &optidx); - - if (c == -1) - break; - - switch (c) { - case 's': - ses = optarg; - break; - case 'g': - grp = optarg; - break; - case 'f': - feats = strtol(optarg, NULL, 16); - break; - - case 'm': - server_mode_flag = 1; - break; - default: - fprintf(stderr, "%s", usage_string); - return -1; - } - } - - if (optind != argc || grp == NULL || ses == NULL) { - fprintf(stderr, "%s", usage_string); - return -1; - } - - if ((feats & ~LST_FEATS_MASK) != 0) { - fprintf(stderr, - "lstclient can't understand these feature bits: %x\n", - (feats & ~LST_FEATS_MASK)); - return -1; - } - - rc = libcfs_debug_init(5 * 1024 * 1024); - if (rc != 0) { - fprintf(stderr, "libcfs_debug_init() failed: %d\n", rc); - return -1; - } - - rc = cfs_wi_startup(); - if (rc != 0) { - fprintf(stderr, "cfs_wi_startup() failed: %d\n", rc); - libcfs_debug_cleanup(); - return -1; - } - - rc = LNetInit(); - if (rc != 0) { - fprintf(stderr, "LNetInit() failed: %d\n", rc); - cfs_wi_shutdown(); - libcfs_debug_cleanup(); - return -1; - } - - if (server_mode_flag) - lnet_server_mode(); - - rc = lnet_selftest_init(); - if (rc != 0) { - fprintf(stderr, "Can't startup selftest\n"); - LNetFini(); - cfs_wi_shutdown(); - libcfs_debug_cleanup(); - return -1; - } - - rc = lstjn_join_session(ses, grp, feats); - if (rc != 0) - goto out; - - signal(SIGINT, lstjn_stop); - - fprintf(stdout, "Start handling selftest requests, Ctl-C to stop\n"); - - while (!lstjn_stopping) { - selftest_wait_events(); - - if (!sfw_session_removed()) - continue; - - fprintf(stdout, "Session ended\n"); - break; - } - -out: - lnet_selftest_fini(); - - LNetFini(); - - cfs_wi_shutdown(); - - libcfs_debug_cleanup(); - - return rc; -} diff --git a/lnet/utils/pthread/.gitignore b/lnet/utils/pthread/.gitignore deleted file mode 100644 index 42a0383..0000000 --- a/lnet/utils/pthread/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile.in -/lstclient diff --git a/lnet/utils/ptlctl.c b/lnet/utils/ptlctl.c deleted file mode 100644 index 81e5548..0000000 --- a/lnet/utils/ptlctl.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. - * - * This file is part of Portals, http://www.sf.net/projects/lustre/ - * - * Portals 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. - * - * Portals 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 - * along with Portals; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include -#include -#include -#include - - -command_t list[] = { - {"network", jt_ptl_network, 0,"select/configure network (args: up|down|LND name)"}, - {"net", jt_ptl_network, 0,"select/configure network (args: up|down|LND name)"}, - {"list_nids", jt_ptl_list_nids, 0,"list local NIDs"}, - {"which_nid", jt_ptl_which_nid, 0,"select the closest NID"}, - {"print_interfaces", jt_ptl_print_interfaces, 0, "print interface entries (no args)"}, - {"add_interface", jt_ptl_add_interface, 0, "add interface entry (args: ip [netmask])"}, - {"del_interface", jt_ptl_del_interface, 0, "delete interface entries (args: [ip])"}, - {"print_peers", jt_ptl_print_peers, 0, "print peer entries (no args)"}, - {"add_peer", jt_ptl_add_peer, 0, "add peer entry (args: nid host port)"}, - {"del_peer", jt_ptl_del_peer, 0, "delete peer entry (args: [nid] [host])"}, - {"print_conns", jt_ptl_print_connections, 0, "print connections (no args)"}, - {"disconnect", jt_ptl_disconnect, 0, "disconnect from a remote nid (args: [nid] [host]"}, - {"push", jt_ptl_push_connection, 0, "flush connection to a remote nid (args: [nid]"}, - {"active_tx", jt_ptl_print_active_txs, 0, "print active transmits (no args)"}, - {"ping", jt_ptl_ping, 0, "ping (args: nid [timeout] [pid])"}, - {"mynid", jt_ptl_mynid, 0, "inform the socknal of the local NID (args: [hostname])"}, - {"add_route", jt_ptl_add_route, 0, - "add an entry to the routing table (args: gatewayNID targetNID [targetNID])"}, - {"del_route", jt_ptl_del_route, 0, - "delete all routes via a gateway from the routing table (args: gatewayNID"}, - {"set_route", jt_ptl_notify_router, 0, - "enable/disable a route in the routing table (args: gatewayNID up/down [time]"}, - {"print_routes", jt_ptl_print_routes, 0, "print the routing table (args: none)"}, - {"dump", jt_ioc_dump, 0, "usage: dump file, save ioctl buffer to file"}, - {"fail", jt_ptl_fail_nid, 0, "usage: fail nid|_all_ [count]"}, - {"testprotocompat", jt_ptl_testprotocompat, 0, "usage: testprotocompat count"}, - {"help", Parser_help, 0, "help"}, - {"exit", Parser_quit, 0, "quit"}, - {"quit", Parser_quit, 0, "quit"}, - { 0, 0, 0, NULL } -}; - -int main(int argc, char **argv) -{ - int rc = 0; - - rc = libcfs_arch_init(); - if (rc < 0) - return rc; - - rc = ptl_initialize(argc, argv); - if (rc < 0) - goto errorout; - - Parser_init("ptlctl > ", list); - if (argc > 1) { - rc = Parser_execarg(argc - 1, &argv[1], list); - goto errorout; - } - - Parser_commands(); - -errorout: - libcfs_arch_cleanup(); - return rc; -} diff --git a/lustre/doc/Makefile.am b/lustre/doc/Makefile.am index b15c822..3dd6a9a 100644 --- a/lustre/doc/Makefile.am +++ b/lustre/doc/Makefile.am @@ -38,7 +38,7 @@ MANFILES = lustre.7 lfs.1 mount.lustre.8 lctl.8 \ llverdev.8 llbackup.8 llapi_quotactl.3 llobdstat.8 llstat.8 \ - plot-llstat.8 l_getgroups.8 lst.8 routerstat.8 lshowmount.8 \ + plot-llstat.8 l_getgroups.8 lst.8 routerstat.8 \ ll_recover_lost_found_objs.8 llog_reader.8 llapi_file_open.3 \ llapi_file_create.3 llapi_file_get_stripe.3 lustreapi.7 \ lustre_rsync.8 lfs_migrate.1 lhbadm.8 ldev.8 ldev.conf.5 nids.5 \ diff --git a/lustre/doc/lshowmount.8 b/lustre/doc/lshowmount.8 deleted file mode 100644 index a2ad08e..0000000 --- a/lustre/doc/lshowmount.8 +++ /dev/null @@ -1,43 +0,0 @@ -.TH LSHOWMOUNT 8 Lustre LLNL LSHOWMOUNT -.SH NAME -lshowmount \- show lustre exports -.SH SYNOPSIS -.B "lshowmount [-ehlv]" -.br -.SH DESCRIPTION -.B lshowmount -Utility to show the hosts that have lustre currently mounted to a server. -Ths utility looks for any exports from the mgs, mds, and obdfilter. -.SH OPTIONS -.B lshowmount -accepts the following options: -.TP -.I "-e | --enumerate" -causes -.B lshowmount -to list each client mounted on a separate line instead of trying -to compress the list of clients into a hostrange string. -.TP -.I "-h | --help" -causes -.B lshowmount -to print out a usage message. -.TP -.I "-l | --lookup" -causes -.B lshowmount -to try to lookup the hostname for nids that look like IP addresses. -.TP -.I "-v | --verbose" -causes -.B lshowmount -to output export information for each service instead of only displaying -the aggregate information for all Lustre services on the server. -.SH FILES -/proc/fs/lustre/mgs//exports//nid -.br -/proc/fs/lustre/mds//exports//nid -.br -/proc/fs/lustre/obdfilter//exports//nid -.SH AUTHOR -Herb Wartens diff --git a/lustre/doc/lst.8 b/lustre/doc/lst.8 index 886ed4f..2d58444 100644 --- a/lustre/doc/lst.8 +++ b/lustre/doc/lst.8 @@ -36,27 +36,15 @@ There are two types of nodes for LNET self-test: the console node and test nodes. Both node types require all previously-specified modules to be loaded. (The userspace test node does not require these modules.) .LP -Test nodes can be in either kernel or userspace. A console user can -invite a kernel test node to join the test session by running -.I "lst add_group NID", -but the user cannot actively add a userspace test node to the -test-session. However, the console user can passively accept a test -node to the test session while the test node runs lstclient to connect -to the console. -.SH UTILITIES -LNET self-test has two user utilities, lst and lstclient. +A console user can invite a test node to join the test session by running +lst add_group \fINID\fR. .LP +.SH UTILITIES .B lst is the user interface for the self-test console (run on console node). It provides a list of commands to control the entire test system, such as create session, create test groups, etc. .LP -.B lstclient -is the userspace self-test program, which is linked with userspace -LNDs and LNET. A user can use lstclient to join a self-test session: -.nf -lstclient -sesid CONSOLE_NID group NAME -.fi .SH EXAMPLE SCRIPT Below is a sample LNET self-test script which simulates the traffic pattern of a set of Lustre servers on a TCP network, accessed by Lustre diff --git a/lustre/doc/lustre.7 b/lustre/doc/lustre.7 index 0458de7..fac9292 100644 --- a/lustre/doc/lustre.7 +++ b/lustre/doc/lustre.7 @@ -82,5 +82,4 @@ http://downloads.whamcloud.com/ .BR llobdstat (8), .BR ll_decode_filter_fid (8), .BR llog_reader (8), -.BR lshowmount (8), .BR lustre_rsync (8) diff --git a/lustre/utils/.gitignore b/lustre/utils/.gitignore index 7558760..d1950fe 100644 --- a/lustre/utils/.gitignore +++ b/lustre/utils/.gitignore @@ -20,7 +20,6 @@ /tunefs_lustre /loadgen /lreplicate -/lshowmount /ll_recover_lost_found_objs /ltrack_stats /lustre_rsync diff --git a/lustre/utils/Makefile.am b/lustre/utils/Makefile.am index da0213f..1c1bb4c 100644 --- a/lustre/utils/Makefile.am +++ b/lustre/utils/Makefile.am @@ -15,7 +15,6 @@ LIBPTLCTL := $(top_builddir)/lnet/utils/libptlctl.a \ $(top_builddir)/libcfs/libcfs/libcfsutil.a \ $(top_builddir)/libcfs/libcfs/libcfs.a -sbin_scripts = lrun bin_scripts = llstat llobdstat plot-llstat llbackup EXTRA_PROGRAMS = wirecheck @@ -24,7 +23,7 @@ if UTILS # mount only finds helpers in /sbin rootsbin_PROGRAMS = mount.lustre sbin_PROGRAMS = lctl wiretest l_getidentity llverfs llverdev \ - llog_reader lr_reader lshowmount lustre_rsync \ + llog_reader lr_reader lustre_rsync \ ll_recover_lost_found_objs ltrack_stats ll_decode_filter_fid if SERVER sbin_PROGRAMS += mkfs.lustre tunefs.lustre @@ -64,8 +63,6 @@ ll_recover_lost_found_objs_SOURCES = ll_recover_lost_found_objs.c ll_recover_lost_found_objs_LDADD := $(LIBPTLCTL) ll_recover_lost_found_objs_DEPENDENCIES := $(LIBPTLCTL) -lshowmount_SOURCES = lshowmount.c nidlist.c nidlist.h - if EXT2FS_DEVEL EXT2FSLIB = -lext2fs E2PLIB = -le2p diff --git a/lustre/utils/automatic-reconnect-sample b/lustre/utils/automatic-reconnect-sample deleted file mode 100755 index bf9ecc4..0000000 --- a/lustre/utils/automatic-reconnect-sample +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -if [ -z "$1" ]; then - echo "No UUID given to Lustre upcall!" | wall - exit 1 -fi - -# FIXME: OSTHOST can't be hard-coded! -OST=$1 -OSTHOST=dev7 -LUSTRE=/home/pschwan/lustre/lustre - -while ( ! ping -c 1 -w 3 $OSTHOST ) ; do - sleep 2 -done; - -echo -n "OST $OSTHOST UUID $OST responding to pings : " -date - -$LUSTRE/utils/lctl < - * Author: Jim Garlick - */ - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "nidlist.h" - -#define PROC_DIRS { \ - "/proc/fs/lustre/mgs", \ - "/proc/fs/lustre/mdt", \ - "/proc/fs/lustre/obdfilter", \ - NULL, \ -} -#define PROC_EXPORTS_TMPL "%s/%s/exports" -#define PROC_UUID_TMPL "%s/%s/uuid" - -static void print_nids(NIDList nidlist, int lookup, int enumerate, int indent); -static int lshowmount(int lookup, int enumerate, int verbose); -static void read_exports(char *exports, NIDList nidlist); - -char *prog; - -#define OPTIONS "ehlv" -static struct option long_options[] = { - {"enumerate", no_argument, 0, 'e'}, - {"help", no_argument, 0, 'h'}, - {"lookup", no_argument, 0, 'l'}, - {"verbose", no_argument, 0, 'v'}, - {0, 0, 0, 0}, -}; - -static void usage(void) -{ - fprintf(stderr, "usage: %s [-e] [-h] [-l] [-v]\n", prog); - exit(1); -} - -int main(int argc, char **argv) -{ - int opt, optidx = 0; - int lopt = 0; - int vopt = 0; - int eopt = 0; - - prog = basename(argv[0]); - - while ((opt = getopt_long(argc, argv, OPTIONS, long_options, &optidx)) != -1) { - switch (opt) { - case 'e': /* --enumerate */ - eopt = 1; - break; - case 'l': /* --lookup */ - lopt = 1; - break; - case 'v': /* --verbose */ - vopt = 1; - break; - case 'h': /* --help */ - default: - usage(); - } - } - - if (lshowmount(lopt, eopt, vopt) == 0) { - fprintf(stderr, "%s: lustre server modules not loaded\n", prog); - exit(1); - } - exit(0); -} - -static void print_nids(NIDList nidlist, int lookup, int enumerate, int indent) -{ - char *s, *sep = "\n", *pfx = ""; - - if (lookup) - nl_lookup_ip(nidlist); - nl_sort(nidlist); - nl_uniq(nidlist); - if (nl_count(nidlist) > 0) { - if (indent) { - sep = "\n "; - pfx = " "; - } - if (enumerate) - s = nl_string(nidlist, sep); - else - s = nl_xstring(nidlist, sep); - printf("%s%s\n", pfx, s); - free(s); - } -} - -static int lshowmount(int lookup, int enumerate, int verbose) -{ - char *dirs[] = PROC_DIRS; - char exp[PATH_MAX + 1]; - NIDList nidlist = NULL; - DIR *topdirp; - struct dirent *dp; - int i; - int opens = 0; - - if (!verbose) - nidlist = nl_create(); - for (i = 0; dirs[i] != NULL; i++) { - if ((topdirp = opendir(dirs[i])) == NULL) - continue; - while ((dp = readdir(topdirp))) { - if (dp->d_type != DT_DIR) - continue; - if (!strcmp(dp->d_name, ".")) - continue; - if (!strcmp(dp->d_name, "..")) - continue; - sprintf(exp, PROC_EXPORTS_TMPL, dirs[i], dp->d_name); - if (verbose) { - nidlist = nl_create(); - read_exports(exp, nidlist); - printf("%s:\n", dp->d_name); - print_nids(nidlist, lookup, enumerate, 1); - nl_destroy(nidlist); - } else - read_exports(exp, nidlist); - } - closedir(topdirp); - opens++; - } - if (!verbose) { - print_nids(nidlist, lookup, enumerate, 0); - nl_destroy(nidlist); - } - return opens; -} - -static int empty_proc_file(char *path) -{ - int empty = 0; - char buf[36]; - int fd; - - if ((fd = open(path, O_RDONLY)) < 0 || read(fd, buf, sizeof(buf)) <= 0) - empty = 1; - if (fd >= 0) - close(fd); - return empty; -} - -static void read_exports(char *exports, NIDList nidlist) -{ - DIR *dirp; - struct dirent *dp; - char path[PATH_MAX + 1]; - - if ((dirp = opendir(exports))) { - while ((dp = readdir(dirp))) { - if (dp->d_type != DT_DIR) - continue; - if (!strcmp(dp->d_name, ".")) - continue; - if (!strcmp(dp->d_name, "..")) - continue; - if (strchr(dp->d_name, '@') == NULL) - continue; - sprintf(path, PROC_UUID_TMPL, exports, dp->d_name); - if (empty_proc_file(path)) - continue; - - nl_add(nidlist, dp->d_name); - } - closedir(dirp); - } -} diff --git a/lustre/utils/module_cleanup.sh b/lustre/utils/module_cleanup.sh deleted file mode 100755 index a30faeb..0000000 --- a/lustre/utils/module_cleanup.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -MDIR=/lib/modules/`uname -r`/lustre -mkdir -p $MDIR - -KVER=24 -EXT=o -FSFLT=fsfilt_ext3 -MODFILE="/etc/modules.conf" -if [ `uname -r | cut -c 3` -eq 6 ]; then - KVER=26 - EXT=ko - FSFLT=fsfilt_ldiskfs - MODFILE="/etc/modprobe.conf" -fi - -echo "Removing Lustre modules from "$MDIR - -rm -f $MDIR/* -depmod -a -rm -f /sbin/mount.lustre -rm -f /usr/sbin/l_getidentity -rm -f /usr/sbin/l_facl diff --git a/lustre/utils/nidlist.c b/lustre/utils/nidlist.c deleted file mode 100644 index 3b04d32..0000000 --- a/lustre/utils/nidlist.c +++ /dev/null @@ -1,338 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * 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. - * - * 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). - * - * 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 - * - * 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) 2009, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * lustre/utils/nidlist.c - * - * Author: Jim Garlick - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "nidlist.h" - -struct nl_struct { - char **nids; - int len; - int count; -}; -#define NL_CHUNK 64 - -extern char *prog; - -static void nl_oom(void) -{ - fprintf(stderr, "%s: out of memory\n", prog); - exit(1); -} - -NIDList nl_create(void) -{ - struct nl_struct *nl; - - if (!(nl = malloc(sizeof(struct nl_struct)))) - nl_oom(); - nl->len = NL_CHUNK; - if (!(nl->nids = malloc(nl->len * sizeof(char *)))) - nl_oom(); - nl->count = 0; - - return nl; -} - -void nl_destroy(NIDList nl) -{ - int i; - - for (i = 0; i < nl->count; i++) - free(nl->nids[i]); - free(nl->nids); - free(nl); -} - -static void nl_grow(NIDList nl, int n) -{ - nl->len += n; - if (!(nl->nids = realloc(nl->nids, nl->len * sizeof(char *)))) - nl_oom(); -} - -void nl_add(NIDList nl, char *nid) -{ - char *cp; - - if (!(cp = strdup(nid))) - nl_oom(); - if (nl->count == nl->len) - nl_grow(nl, NL_CHUNK); - nl->nids[nl->count++] = cp; -} - -int nl_count(NIDList nl) -{ - return nl->count; -} - -static char *nl_nid_addr(char *nid) -{ - char *addr, *p; - - if (!(addr = strdup(nid))) - nl_oom(); - if ((p = strchr(addr, '@'))) - *p = '\0'; - - return addr; -} - -static int nl_nid_parse_addr(char *addr) -{ - int o; - - for (o = strlen(addr); o > 0; o--) - if (!isdigit(addr[o - 1])) - break; - - return o; -} - -static int nl_cmp_addr(char *nid1, char *nid2, int *cflagp) -{ - char *p1 = nl_nid_addr(nid1); - char *p2 = nl_nid_addr(nid2); - int res, o1, o2, cflag = 0; - - o1 = nl_nid_parse_addr(p1); - o2 = nl_nid_parse_addr(p2); - - if (o1 == o2 && (res = strncmp(p1, p2, o1)) == 0) { - res = strtoul(&p1[o1], NULL, 10) - strtoul(&p2[o2], NULL, 10); - if (cflagp && strlen(&p1[o1]) > 0 && strlen(&p2[o2]) > 0) - cflag = 1; - } else - res = strcmp(p1, p2); - free(p1); - free(p2); - if (cflagp) - *cflagp = cflag; - return res; -} - -static int nl_cmp_lnet(char *nid1, char *nid2) -{ - char *s1 = strchr(nid1, '@'); - char *s2 = strchr(nid2, '@'); - - return strcmp(s1 ? s1 + 1 : "", s2 ? s2 + 1 : ""); -} - -static int nl_cmp(const void *p1, const void *p2) -{ - int res; - - if ((res = nl_cmp_lnet(*(char **)p1, *(char **)p2)) == 0) - res = nl_cmp_addr(*(char **)p1, *(char **)p2, NULL); - return res; -} - -void nl_sort(NIDList nl) -{ - qsort(nl->nids, nl->count, sizeof(char *), nl_cmp); -} - -void nl_uniq(NIDList nl) -{ - int i, j; - - for (i = 1; i < nl->count; i++) { - if (!strcmp(nl->nids[i], nl->nids[i - 1])) { - free(nl->nids[i]); - for (j = i; j < nl->count - 1; j++) - nl->nids[j] = nl->nids[j + 1]; - nl->count--; - i--; - } - } -} - -static char *nl_nid_lookup_ipaddr(char *nid) -{ - struct addrinfo *ai, *aip; - char name[NI_MAXHOST] = ""; - char *p, *addr, *lnet = NULL, *res = NULL; - int len, x; - - addr = nl_nid_addr(nid); - if (sscanf(addr, "%d.%d.%d.%d", &x, &x, &x, &x) == 4) { - if ((p = strchr(nid, '@'))) - lnet = p + 1; - if (getaddrinfo(addr, NULL, NULL, &ai) == 0) { - for (aip = ai; aip != NULL; aip = aip->ai_next) { - if (getnameinfo(aip->ai_addr, aip->ai_addrlen, - name, sizeof(name), NULL, 0, - NI_NAMEREQD | NI_NOFQDN) == 0) { - if ((p = strchr(name, '.'))) - *p = '\0'; - len = strlen(name) + 2; - if (lnet != NULL) - len += strlen(lnet); - if (!(res = malloc(len))) - nl_oom(); - if (lnet != NULL) - snprintf(res, len, "%s@%s", - name, lnet); - else - snprintf(res, len, "%s", name); - break; - } - } - freeaddrinfo(ai); - } - } - free(addr); - - return res; -} - -void nl_lookup_ip(NIDList nl) -{ - int i; - char *new; - - for (i = 0; i < nl->count; i++) { - if ((new = nl_nid_lookup_ipaddr(nl->nids[i]))) { - free(nl->nids[i]); - nl->nids[i] = new; - } - } -} - -char *nl_string(NIDList nl, char *sep) -{ - int seplen = strlen(sep); - int i, len = 1; - char *s; - - for (i = 0; i < nl->count; i++) - len += strlen(nl->nids[i]) + seplen; - if (!(s = malloc(len))) - nl_oom(); - s[0] = '\0'; - for (i = 0; i < nl->count; i++) { - if (i > 0) - strcat(s, sep); - strcat(s, nl->nids[i]); - } - return s; -} - -static void nl_strxcat(char *s, char **nids, int len) -{ - int i, o, lastn = 0; - char *base, *p, *lnet = NULL, *savedn = NULL; - - if ((p = strchr(nids[0], '@'))) - lnet = p + 1; - base = nl_nid_addr(nids[0]); - o = nl_nid_parse_addr(base); - base[o] = '\0'; - for (i = 0; i < len; i++) { - char *addr = nl_nid_addr(nids[i]); - int n = strtoul(&addr[o], NULL, 10); - - if (i == 0) - sprintf(s + strlen(s), "%s[%s", base, &addr[o]); - else if (i < len) { - if (n == lastn + 1) { - if (savedn) - free(savedn); - if (!(savedn = strdup(&addr[o]))) - nl_oom(); - } else { - if (savedn) { - sprintf(s + strlen(s), "-%s", savedn); - free(savedn); - savedn = NULL; - } - sprintf(s + strlen(s), ",%s", &addr[o]); - } - } - if (i == len - 1) { - if (savedn) { - sprintf(s + strlen(s), "-%s", savedn); - free(savedn); - } - strcat(s, "]"); - if (lnet) - sprintf(s + strlen(s), "@%s", lnet); - } - free(addr); - lastn = n; - } - free(base); -} - -char *nl_xstring(NIDList nl, char *sep) -{ - int seplen = strlen(sep); - int cflag, i, j, len = 1; - char *s; - - for (i = 0; i < nl->count; i++) - len += strlen(nl->nids[i]) + seplen; - if (!(s = malloc(len))) - nl_oom(); - s[0] = '\0'; - for (i = 0; i < nl->count; i++) { - if (i > 0) - strcat(s, sep); - for (j = i + 1; j < nl->count; j++) { - if (nl_cmp_lnet(nl->nids[i], nl->nids[j]) != 0) - break; - (void)nl_cmp_addr(nl->nids[i], nl->nids[j], &cflag); - if (!cflag) - break; - } - if (j - i > 1) - nl_strxcat(s, &nl->nids[i], j - i); - else - strcat(s, nl->nids[i]); - i += j - i - 1; - } - return s; -} diff --git a/lustre/utils/nidlist.h b/lustre/utils/nidlist.h deleted file mode 100644 index 9d9d172..0000000 --- a/lustre/utils/nidlist.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * 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. - * - * 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). - * - * 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 - * - * 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) 2009, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * lustre/utils/nidlist.h - * - * Author: Jim Garlick - */ - -#ifndef NIDLIST_H -#define NIDLIST_H - -typedef struct nl_struct *NIDList; - -NIDList nl_create(void); -void nl_destroy(NIDList nl); -void nl_add(NIDList nl, char *nid); -int nl_count(NIDList nl); -void nl_lookup_ip(NIDList nl); -void nl_sort(NIDList nl); -void nl_uniq(NIDList nl); -char *nl_string(NIDList nl, char *sep); -char *nl_xstring(NIDList nl, char *sep); - -#endif diff --git a/lustre/utils/obdctl.c b/lustre/utils/obdctl.c deleted file mode 100644 index 26443aa..0000000 --- a/lustre/utils/obdctl.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * 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. - * - * 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). - * - * 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 - * - * 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) 2001, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * lustre/utils/obdctl.c - * - * Author: Peter J. Braam - * Author: Phil Schwan - */ - -#include -#include - -#include "obdctl.h" -#include - -/* the functions that were in here are now in obd.c */ - -static int jt_quit(int argc, char **argv) -{ - int rc = 0; - Parser_quit(argc, argv); - - return rc; -} - -command_t cmdlist[] = { - /* Metacommands */ - {"--device", jt_opt_device, 0, "--device "}, - {"--threads", jt_opt_threads, 0, - "--threads "}, - - /* Device configuration commands */ - {"lov_setconfig", jt_obd_lov_setconfig, 0, "configure lov data on MDS " - "[usage: lovconfig lov-uuid stripecount, stripesize, pattern, UUID1, [UUID2, ...]"}, - {"list", jt_obd_list, 0, "list the devices (no args)"}, - {"newdev", jt_obd_newdev, 0, "set device to a new unused obd (no args)"}, - {"device", jt_obd_device, 0, "set current device (args device_no name)"}, - {"name2dev", jt_obd_name2dev, 0, - "set device by name [usage: name2dev devname]"}, - {"attach", jt_obd_attach, 0, "name the type of device (args: type data"}, - {"setup", jt_obd_setup, 0, "setup device (args: [data]"}, - {"detach", jt_obd_detach, 0, "detach the current device (arg: )"}, - {"cleanup", jt_obd_cleanup, 0, "cleanup the current device (arg: )"}, - - /* Session commands */ - {"connect", jt_obd_connect, 0, "connect - get a connection to device"}, - {"disconnect", jt_obd_disconnect, 0, - "disconnect - break connection to device"}, - - /* Session operations */ - {"create", jt_obd_create, 0, "create [mode [verbose]]"}, - {"destroy", jt_obd_destroy, 0, "destroy [count [verbose]]"}, - {"getattr", jt_obd_getattr, 0, "getattr "}, - {"setattr", jt_obd_setattr, 0, "setattr "}, - {"newconn", jt_obd_newconn, 0, "newconn [newuuid]"}, - {"test_getattr", jt_obd_test_getattr, 0, "test_getattr [verbose [[t]objid]]"}, - {"test_setattr", jt_obd_test_setattr, 0, "test_setattr [verbose [[t]objid]]"}, - {"test_brw", jt_obd_test_brw, 0, "test_brw [t] [write [verbose [pages [[t]objid]]]]"}, - {"dump_ldlm", jt_obd_dump_ldlm, 0, "dump all lock manager state (no args)"}, - - /* User interface commands */ - {"help", Parser_help, 0, "help"}, - {"exit", jt_quit, 0, "quit"}, - {"quit", jt_quit, 0, "quit"}, - {0, 0, 0, NULL} -}; - - -int main(int argc, char **argv) -{ - int rc; - - setlinebuf(stdout); - - if (obd_initialize(argc, argv) < 0) - exit(1); - - Parser_init("obdctl > ", cmdlist); - - if (argc > 1) { - rc = Parser_execarg(argc - 1, argv + 1, cmdlist); - } else { - rc = Parser_commands(); - } - - obd_finalize(argc, argv); - return rc; -} diff --git a/lustre/utils/pthread/.gitignore b/lustre/utils/pthread/.gitignore deleted file mode 100644 index d5ffce0..0000000 --- a/lustre/utils/pthread/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/Makefile.in -/lctl -/lfs -/loadgen diff --git a/lustre/utils/rmmod_all.sh b/lustre/utils/rmmod_all.sh deleted file mode 100755 index 5b23988..0000000 --- a/lustre/utils/rmmod_all.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -SRCDIR=`dirname $0` -PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH - -rmmod pingsrv -rmmod pingcli -rmmod quotacheck_test -rmmod quotactl_test -rmmod quotafmt_test - -lctl modules | awk '{ print $2 }' | xargs rmmod >/dev/null 2>&1 -# do it again, in case we tried to unload ksocklnd too early -lsmod | grep lnet > /dev/null && lctl modules | awk '{ print $2 }' | xargs rmmod -- 1.8.3.1