diff --git a/build/lustre.spec.in b/build/lustre.spec.in index 8b1eb2c859bf7d12c8af64c159a458901639417b..4a9ef8eb02848e2324e86c7a1378052bb626f2d6 100644 --- a/build/lustre.spec.in +++ b/build/lustre.spec.in @@ -118,7 +118,7 @@ cat >lustre.files <<EOF %attr(-, root, root) %{_mandir}/man?/* -%attr(-, root, root) %{_libdir}/lustre/lc_common.sh +%attr(-, root, root) %{_libdir}/lustre/lc_common EOF if [ -f $RPM_BUILD_ROOT%{_libdir}/liblustre.so ] ; then diff --git a/lustre/doc/lustre.7 b/lustre/doc/lustre.7 index 460df98fe06bdcf296d4c1442db608fec1170321..fbcf3755491df5323cc7c36b4000ec25834fbc93 100644 --- a/lustre/doc/lustre.7 +++ b/lustre/doc/lustre.7 @@ -57,7 +57,7 @@ A low-level interface to control various aspects of Lustre .B lfs(1) A user-level interface to control Lustre-specific information for individual files. -.B lustre_config.sh +.B lustre_config Format multiple Lustre targets simultaneously from definitions in a CSV file. .SH BUGS diff --git a/lustre/scripts/Makefile.am b/lustre/scripts/Makefile.am index 230664e383f52520c198473bd836c4b2fd26fed5..f0a44a33e4ca7ad55b8da3670a6064b5e35a6ab4 100644 --- a/lustre/scripts/Makefile.am +++ b/lustre/scripts/Makefile.am @@ -3,23 +3,23 @@ # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -sbinscripts = lc_servip.sh lustre_up14.sh lustre_rmmod.sh +sbinscripts = lc_servip lustre_up14 lustre_rmmod # These are scripts that are generated from .in files -genscripts = lustre_config.sh lc_modprobe.sh lc_net.sh lc_hb.sh lc_cluman.sh lustre_createcsv.sh lc_md.sh lc_lvm.sh +genscripts = lustre_config lc_modprobe lc_net lc_hb lc_cluman lustre_createcsv lc_md lc_lvm sbin_SCRIPTS = $(genscripts) $(sbinscripts) -bin_SCRIPTS = lustre_req_history.sh +bin_SCRIPTS = lustre_req_history -EXTRA_DIST = license-status maketags.sh version_tag.pl.in lc_common.sh \ - $(addsuffix .in,$(genscripts)) lc_mon.sh $(sbinscripts) \ +EXTRA_DIST = license-status maketags.sh version_tag.pl.in lc_common \ + $(addsuffix .in,$(genscripts)) lc_mon $(sbinscripts) \ $(bin_SCRIPTS) scriptlibdir = $(libdir)/@PACKAGE@ -scriptlib_DATA = lc_common.sh +scriptlib_DATA = lc_common CLEANFILES = $(genscripts) -$(genscripts): %.sh: %.sh.in +$(genscripts): %: %.in sed -e 's#@scriptlibdir@#$(scriptlibdir)#' < $< > $@ chmod +x $@ diff --git a/lustre/scripts/lc_cluman.sh.in b/lustre/scripts/lc_cluman.in similarity index 98% rename from lustre/scripts/lc_cluman.sh.in rename to lustre/scripts/lc_cluman.in index c122c428064ebd1f6dacd1ad7173b9cfb8aa578f..11194a698cf3fe57c6918e32c53e971c31beec55 100644 --- a/lustre/scripts/lc_cluman.sh.in +++ b/lustre/scripts/lc_cluman.in @@ -1,7 +1,7 @@ #!/bin/bash # -# lc_cluman.sh - script for generating the Red Hat Cluster Manager -# HA software's configuration files +# lc_cluman - script for generating the Red Hat Cluster Manager +# HA software's configuration files # ################################################################################ @@ -38,7 +38,7 @@ EOF } # Get the library of functions -. @scriptlibdir@/lc_common.sh +. @scriptlibdir@/lc_common #****************************** Global variables ******************************# TMP_DIR=${CLUMGR_TMP_DIR} # Temporary directory diff --git a/lustre/scripts/lc_common.sh b/lustre/scripts/lc_common similarity index 96% rename from lustre/scripts/lc_common.sh rename to lustre/scripts/lc_common index 8fb00d658dbbd92829f4ef2ae555abeed07b2418..06a547f6516df935b50074cb2af72868b47f1038 100644 --- a/lustre/scripts/lc_common.sh +++ b/lustre/scripts/lc_common @@ -1,8 +1,8 @@ # # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4: # -# lc_common.sh - This file contains functions to be used by most or all -# Lustre cluster config scripts. +# lc_common - This file contains functions to be used by most or all +# Lustre cluster config scripts. # ################################################################################ @@ -25,14 +25,14 @@ MDADM=${MDADM:-"$RAID_CMD_PATH/mdadm"} # Some scripts to be called SCRIPTS_PATH=${CLUSTER_SCRIPTS_PATH:-"$(cd `dirname $0`; echo $PWD)"} -MODULE_CONFIG=${SCRIPTS_PATH}/lc_modprobe.sh -VERIFY_CLUSTER_NET=${SCRIPTS_PATH}/lc_net.sh -GEN_HB_CONFIG=${SCRIPTS_PATH}/lc_hb.sh -GEN_CLUMGR_CONFIG=${SCRIPTS_PATH}/lc_cluman.sh -SCRIPT_VERIFY_SRVIP=${SCRIPTS_PATH}/lc_servip.sh -SCRIPT_GEN_MONCF=${SCRIPTS_PATH}/lc_mon.sh -SCRIPT_CONFIG_MD=${SCRIPTS_PATH}/lc_md.sh -SCRIPT_CONFIG_LVM=${SCRIPTS_PATH}/lc_lvm.sh +MODULE_CONFIG=${SCRIPTS_PATH}/lc_modprobe +VERIFY_CLUSTER_NET=${SCRIPTS_PATH}/lc_net +GEN_HB_CONFIG=${SCRIPTS_PATH}/lc_hb +GEN_CLUMGR_CONFIG=${SCRIPTS_PATH}/lc_cluman +SCRIPT_VERIFY_SRVIP=${SCRIPTS_PATH}/lc_servip +SCRIPT_GEN_MONCF=${SCRIPTS_PATH}/lc_mon +SCRIPT_CONFIG_MD=${SCRIPTS_PATH}/lc_md +SCRIPT_CONFIG_LVM=${SCRIPTS_PATH}/lc_lvm # Variables of HA software HBVER_HBV1="hbv1" # Heartbeat version 1 diff --git a/lustre/scripts/lc_hb.sh.in b/lustre/scripts/lc_hb.in similarity index 99% rename from lustre/scripts/lc_hb.sh.in rename to lustre/scripts/lc_hb.in index f5afb4ecd9ddfacbcc55d29b2b366acf9b0b4645..0fa1fb0ac881e759d01d63ff3407043852b73197 100644 --- a/lustre/scripts/lc_hb.sh.in +++ b/lustre/scripts/lc_hb.in @@ -1,7 +1,7 @@ #!/bin/bash # -# lc_hb.sh - script for generating the Heartbeat HA software's -# configuration files +# lc_hb - script for generating the Heartbeat HA software's +# configuration files # ############################################################################### @@ -31,7 +31,7 @@ EOF } # Get the library of functions -. @scriptlibdir@/lc_common.sh +. @scriptlibdir@/lc_common #****************************** Global variables ******************************# # Heartbeat tools diff --git a/lustre/scripts/lc_lvm.sh.in b/lustre/scripts/lc_lvm.in similarity index 99% rename from lustre/scripts/lc_lvm.sh.in rename to lustre/scripts/lc_lvm.in index 6d9f7e517f460080d065e6ba3ac0d093cfa08d81..98248d7ef612997c41bf2db9b2ef78cc879f052a 100644 --- a/lustre/scripts/lc_lvm.sh.in +++ b/lustre/scripts/lc_lvm.in @@ -2,7 +2,7 @@ # # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4: # -# lc_lvm.sh - configure Linux LVM devices from a csv file +# lc_lvm - configure Linux LVM devices from a csv file # ################################################################################ @@ -118,7 +118,7 @@ EOF } # Get the library of functions -. @scriptlibdir@/lc_common.sh +. @scriptlibdir@/lc_common #***************************** Global variables *****************************# # All the LVM device items in the csv file diff --git a/lustre/scripts/lc_md.sh.in b/lustre/scripts/lc_md.in similarity index 99% rename from lustre/scripts/lc_md.sh.in rename to lustre/scripts/lc_md.in index 48109d04f0e8898eadedf5bbb0126cfb562fbba8..127974d1ff76d300e93742e3e54d630c41345732 100644 --- a/lustre/scripts/lc_md.sh.in +++ b/lustre/scripts/lc_md.in @@ -2,7 +2,7 @@ # # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4: # -# lc_md.sh - configure Linux MD devices from a csv file +# lc_md - configure Linux MD devices from a csv file # ################################################################################ @@ -70,7 +70,7 @@ EOF } # Get the library of functions -. @scriptlibdir@/lc_common.sh +. @scriptlibdir@/lc_common #***************************** Global variables *****************************# # All the MD device items in the csv file diff --git a/lustre/scripts/lc_modprobe.sh.in b/lustre/scripts/lc_modprobe.in similarity index 92% rename from lustre/scripts/lc_modprobe.sh.in rename to lustre/scripts/lc_modprobe.in index 6116a26c84628939d7180ffb8fff08521cf36253..2fe7f786a86a2b5062f70965f22a9c3293234772 100644 --- a/lustre/scripts/lc_modprobe.sh.in +++ b/lustre/scripts/lc_modprobe.in @@ -1,12 +1,12 @@ #!/bin/bash # -# lc_modprobe.sh - add lustre module options into modprobe.conf or -# modules.conf +# lc_modprobe - add lustre module options into modprobe.conf or +# modules.conf # ################################################################################# # Get the library of functions -. @scriptlibdir@/lc_common.sh +. @scriptlibdir@/lc_common # Check the kernel version KERNEL_VERSION=`uname -r` diff --git a/lustre/scripts/lc_mon.sh b/lustre/scripts/lc_mon old mode 100755 new mode 100644 similarity index 100% rename from lustre/scripts/lc_mon.sh rename to lustre/scripts/lc_mon diff --git a/lustre/scripts/lc_net.sh.in b/lustre/scripts/lc_net.in similarity index 98% rename from lustre/scripts/lc_net.sh.in rename to lustre/scripts/lc_net.in index 4bc889f84a1fa6df9db160e7fe2178ba47e897f6..d618c699a3a52c2c96775dc3d0b37f3ab54bf941 100644 --- a/lustre/scripts/lc_net.sh.in +++ b/lustre/scripts/lc_net.in @@ -1,6 +1,6 @@ #!/bin/bash # -# lc_net.sh - script for Lustre cluster network verification +# lc_net - script for Lustre cluster network verification # ############################################################################### @@ -27,7 +27,7 @@ EOF } # Get the library of functions -. @scriptlibdir@/lc_common.sh +. @scriptlibdir@/lc_common VERBOSE_OUTPUT=false # Get and check the positional parameters diff --git a/lustre/scripts/lc_servip.sh b/lustre/scripts/lc_servip old mode 100755 new mode 100644 similarity index 97% rename from lustre/scripts/lc_servip.sh rename to lustre/scripts/lc_servip index 779aa34de7219b0fb9dc53d3ccd7942388a20261..92c6ab2cf1b790cd66bf48be08ae25c3ce8db042 --- a/lustre/scripts/lc_servip.sh +++ b/lustre/scripts/lc_servip @@ -1,7 +1,7 @@ #!/bin/bash # -# lc_servip.sh - script for verifying the service IP and the real -# interface IP in a remote host are in the same subnet +# lc_servip - script for verifying the service IP and the real +# interface IP in a remote host are in the same subnet # ############################################################################### diff --git a/lustre/scripts/lmc2csv.pl b/lustre/scripts/lmc2csv.pl index 86959bb4e8c153b73f39fd6a12de0b861456069d..73da5fe315fe7adc37666261842e184aab3fd55c 100644 --- a/lustre/scripts/lmc2csv.pl +++ b/lustre/scripts/lmc2csv.pl @@ -3,7 +3,7 @@ # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4: # -# convert an lmc batch file to a csv file for lustre_config.sh +# convert an lmc batch file to a csv file for lustre_config # use strict; use warnings; diff --git a/lustre/scripts/lustre_config.sh.in b/lustre/scripts/lustre_config.in similarity index 99% rename from lustre/scripts/lustre_config.sh.in rename to lustre/scripts/lustre_config.in index cde6aee98713e7fd83e6240bdabc2ff191a8e751..47662b4e52c3fe7f14c075a0c37d727a444cc373 100644 --- a/lustre/scripts/lustre_config.sh.in +++ b/lustre/scripts/lustre_config.in @@ -3,7 +3,7 @@ # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4: # -# lustre_config.sh - format and set up multiple lustre servers from a csv file +# lustre_config - format and set up multiple lustre servers from a csv file # # This script is used to parse each line of a spreadsheet (csv file) and # execute remote commands to format (mkfs.lustre) every Lustre target @@ -228,7 +228,7 @@ EOF } # Get the library of functions -. @scriptlibdir@/lc_common.sh +. @scriptlibdir@/lc_common #***************************** Global variables *****************************# declare -a MGS_NODENAME # node names of the MGS servers @@ -1139,7 +1139,7 @@ modify_fstab() { # Execute remote command to modify /etc/fstab device_name=${DEVICE_NAME[i]//\//\\/} - COMMAND=". @scriptlibdir@/lc_common.sh; \ + COMMAND=". @scriptlibdir@/lc_common; \ sed -i \"/^${device_name}\t/d\" \$(fcanon /etc/fstab); \ echo -e \"${mntent}\" >> \$(fcanon /etc/fstab)" ${REMOTE} ${HOST_NAME[i]} "${COMMAND}" >&2 diff --git a/lustre/scripts/lustre_createcsv.sh.in b/lustre/scripts/lustre_createcsv.in similarity index 99% rename from lustre/scripts/lustre_createcsv.sh.in rename to lustre/scripts/lustre_createcsv.in index 5d73594c6916af7db465436d975c6c996ca0af71..986e6e5f2b4687979e19f06c153c07bc72927fb3 100644 --- a/lustre/scripts/lustre_createcsv.sh.in +++ b/lustre/scripts/lustre_createcsv.in @@ -1,10 +1,10 @@ #!/bin/bash # -# lustre_createcsv.sh - generate a csv file from a running lustre cluster +# lustre_createcsv - generate a csv file from a running lustre cluster # # This script is used to collect lustre target informations, linux MD/LVM device # informations and HA software configurations in a lustre cluster to generate a -# csv file. In reverse, the csv file could be parsed by lustre_config.sh to +# csv file. In reverse, the csv file could be parsed by lustre_config to # configure multiple lustre servers in parallel. # # This script should be run on the MGS node. @@ -37,7 +37,7 @@ EOF } # Get the library of functions -. @scriptlibdir@/lc_common.sh +. @scriptlibdir@/lc_common #**************************** Global variables ****************************# # csv file diff --git a/lustre/scripts/lustre_req_history.sh b/lustre/scripts/lustre_req_history old mode 100755 new mode 100644 similarity index 100% rename from lustre/scripts/lustre_req_history.sh rename to lustre/scripts/lustre_req_history diff --git a/lustre/scripts/lustre_rmmod.sh b/lustre/scripts/lustre_rmmod similarity index 100% rename from lustre/scripts/lustre_rmmod.sh rename to lustre/scripts/lustre_rmmod diff --git a/lustre/scripts/lustre_up14.sh b/lustre/scripts/lustre_up14 old mode 100755 new mode 100644 similarity index 100% rename from lustre/scripts/lustre_up14.sh rename to lustre/scripts/lustre_up14 diff --git a/lustre/tests/runobdstat b/lustre/tests/runobdstat index ad60d6da009ccf37f6e0383bb69a8202dc941c36..7fd61ee112aa051c03dea3c2c8fc55db75724b04 100644 --- a/lustre/tests/runobdstat +++ b/lustre/tests/runobdstat @@ -1,7 +1,7 @@ #!/bin/sh PATH=`dirname $0`/../utils:$PATH -llobdstat.pl $1 1 | while read LINE; do +llobdstat $1 1 | while read LINE; do echo "`date +s`: $LINE" [ "$2" ] && echo "`date +s`: $LINE" >> $2 done diff --git a/lustre/utils/Makefile.am b/lustre/utils/Makefile.am index 049b1afb1b42ce211d153cba80cd6ec5be2ef0a6..5b09c54ae0ef4f4b17e6b499692959fb2b40e9b9 100644 --- a/lustre/utils/Makefile.am +++ b/lustre/utils/Makefile.am @@ -7,7 +7,7 @@ AM_LDFLAGS := -L$(top_builddir)/lnet/utils LIBPTLCTL := $(top_builddir)/lnet/utils/libptlctl.a sbin_scripts = lrun -bin_scripts = llstat.pl llobdstat.pl plot-llstat.pl +bin_scripts = llstat llobdstat plot-llstat if UTILS noinst_PROGRAMS = wirecheck wiretest obdio obdbarrier diff --git a/lustre/utils/llobdstat.pl b/lustre/utils/llobdstat old mode 100755 new mode 100644 similarity index 98% rename from lustre/utils/llobdstat.pl rename to lustre/utils/llobdstat index 4feb3c1a7ac33296a43a8cecd74423b32756e40c..300c9d882bbc56ab548eb9124fcd6a19325b9d16 --- a/lustre/utils/llobdstat.pl +++ b/lustre/utils/llobdstat @@ -1,5 +1,5 @@ #!/usr/bin/perl -# llobdstat.pl is a utility that parses obdfilter statistics files +# llobdstat is a utility that parses obdfilter statistics files # found at proc/fs/lustre/<ostname>/stats. # It is mainly useful to watch the statistics change over time. diff --git a/lustre/utils/llstat.pl b/lustre/utils/llstat old mode 100755 new mode 100644 similarity index 98% rename from lustre/utils/llstat.pl rename to lustre/utils/llstat index af22e69f0c288a99c873406f7c2638d578012ff1..d3ddd0f5bea3fc1f8f9321c18ed0b7f7ca29fcc6 --- a/lustre/utils/llstat.pl +++ b/lustre/utils/llstat @@ -1,5 +1,5 @@ #!/usr/bin/perl -# llstat.pl is a utility that takes stats files as input with optional +# llstat is a utility that takes stats files as input with optional # clear-flag. The clear-flag is used to clear the stats file before # printing stats information. The lustre stats files generally located # inside proc/fs/lustre/. This program first reads the required statistics diff --git a/lustre/utils/plot-llstat.pl b/lustre/utils/plot-llstat old mode 100755 new mode 100644 similarity index 88% rename from lustre/utils/plot-llstat.pl rename to lustre/utils/plot-llstat index 227d24d6829bf7d0cf44b4d5af0908b39e97adc0..9ffcaeac0353ae0b0f81bfa37f5bb990bba35cd2 --- a/lustre/utils/plot-llstat.pl +++ b/lustre/utils/plot-llstat @@ -1,20 +1,20 @@ #!/usr/bin/perl -w -# Report generation for llstat.pl +# Report generation for llstat # =============================== -# The plot-llstat.pl script is used to generate csv file and -# instructions files for gnuplot from the output of llstat.pl script. -# Since llstat.pl is generic in nature, plot-llstat.pl is also generic +# The plot-llstat script is used to generate csv file and +# instructions files for gnuplot from the output of llstat script. +# Since llstat is generic in nature, plot-llstat is also generic # script. # # Assume that: # operations = { open, close, read_bytes, write_bytes, connect, create, .. etc.} # parameters = { Rate, Total} # -# plot-llstat.pl script creates dat(csv) file using number of operations +# plot-llstat script creates dat(csv) file using number of operations # specified by the user. Number of operations equals to number of columns in csv # file. And values in those columns are equals to the corresponding value of # the "$param_inx" parameter from the output file. -# The plot-llstat.pl also creates .scr file that contains instructions +# The plot-llstat also creates .scr file that contains instructions # for gnuplot to plot the graph. After generating .dat and .scr files this # script invokes gnuplot to display graph. @@ -27,22 +27,22 @@ # by changing value of $param_inx. # Syntax: -# $ plot-llstat.pl <results_filename> [parameter index (default=2, i.e. Rate)] +# $ plot-llstat <results_filename> [parameter index (default=2, i.e. Rate)] # [Note: 1. The output filt given to this script must have been generated -# with -g option to the llstat.pl script. +# with -g option to the llstat script. # 2. This script may need modifications whenever there will be -# modifications in output format of llstat.pl script.] +# modifications in output format of llstat script.] # arg 0 is filename sub usages_msg(){ - print "$0 parses and graphs the output of llstat.pl using gnuplot,\n"; + print "$0 parses and graphs the output of llstat using gnuplot,\n"; print "and generates .dat files for use in spreadsheets.\n"; print "Usage: $0 <results_filename> [parameter_index]\n"; print " where parameter_index is one of:\n"; print " 1 - Count per interval\n"; print " 2 - Rate (count per second) (default)\n"; print " 3 - Total count\n"; - print "ex: # llstat.pl -i2 -g -c lustre-OST0000 > log\n"; + print "ex: # llstat -i2 -g -c lustre-OST0000 > log\n"; print " # $0 log 3\n"; exit 1; }