From 9e457a4297d183b378d80e403d6f226d99bc9f97 Mon Sep 17 00:00:00 2001 From: Frank Scheiner Date: Fri, 4 Jul 2014 15:23:02 +0200 Subject: [PATCH 01/11] Corrected help output. --- bin/testgftp.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/testgftp.sh b/bin/testgftp.sh index 73fc29f..d2be2d8 100755 --- a/bin/testgftp.sh +++ b/bin/testgftp.sh @@ -4,7 +4,7 @@ :<. @@ -520,7 +520,9 @@ SINGLE TEST Mode: "cat PRE_COMMAND_OUTPUT.txt", which enables to include output of the pre-command in the logfile (for example network params of the target system or traceroute - output, etc.). If not specified no comment is added. + output, etc.). If not specified no comment is added. + Text only comments, meaning no command should be called, + have to be preceded by "#"! [--pre-command "gsiftpTransferPreCommand"] Determine the filename of the command that should be @@ -528,9 +530,7 @@ SINGLE TEST Mode: path must be included). Must be enclosed by double quotes.A pre-command may consist of multiple commands included in one script. If not specified no additional - command will be excuted before the test. Text only - comments, meaning no command should be called, have to - be preceded by "#"! + command will be excuted before the test. [--post-command "gsiftpTransferPostCommand"] Determine the filename of the command that should be From 1f6927acf886863bb07bb4a7ef179ed159a3f493 Mon Sep 17 00:00:00 2001 From: Frank Scheiner Date: Fri, 4 Jul 2014 15:29:48 +0200 Subject: [PATCH 02/11] Modified program output to include program name so it is easier to differentiate between output from tgftp and guc. --- bin/testgftp.sh | 56 +++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/bin/testgftp.sh b/bin/testgftp.sh index d2be2d8..03ab686 100755 --- a/bin/testgftp.sh +++ b/bin/testgftp.sh @@ -28,7 +28,7 @@ contract number RI-222919. COPYRIGHT -VERSION="0.6.2" +VERSION="0.7.0BETA1" # The version numbering of tgftp tries to follow the "Semantic Versioning #+ 2.0.0-rc.1" specification avilable on . @@ -39,6 +39,8 @@ EXIT_VAL="0" _sigintReceived=0 +_selfName=$( basename $0 ) + ################################################################################ # EXIT CODES ################################################################################ @@ -956,7 +958,7 @@ process_batchfile() local FILE_VERSION=$($GREP_BIN "#%tgftp" <$FILE | $SED_BIN -e 's/^#%tgftp%v//') if ! echo "$SUPPORTED_BATCHFILE_VERSIONS" | $GREP_BIN "$FILE_VERSION" &>/dev/null; then - echo "ERROR: $(basename $0) batch file version \"v$FILE_VERSION\" not supported!" 1>&2 + echo "$_selfName: tgftp batch file version \"v$FILE_VERSION\" not supported!" 1>&2 exit "$_tgftp_exit_usage" fi @@ -1068,7 +1070,7 @@ process_batchfile() #+ only 9 fields. elif [[ `echo "${#CSV_LINE[@]}"` -lt "9" ]]; then echo "Fields: ${#CSV_LINE[@]}" - echo "WARNING: Line $LINE_NUMBER: Less than 10 fields! Skipping line!" 1>&2 + echo "$_selfName: line $LINE_NUMBER has less than 10 fields! Skipping line!" 1>&2 LINE_NUMBER=$(( $LINE_NUMBER + 1 )) continue fi @@ -1106,7 +1108,7 @@ process_batchfile() GSIFTP_SOURCE_URL="${CSV_LINE[0]}" else # if empty, print out warning and skip line - echo "WARNING: Line $LINE_NUMBER: \"source\" field is empty! Skipping line!" 1>&2 + echo "$_selfName: in line $LINE_NUMBER: \"source\" field is empty! Skipping line!" 1>&2 continue fi @@ -1115,7 +1117,7 @@ process_batchfile() GSIFTP_TARGET_URL="${CSV_LINE[1]}" else # if empty, print out warning and skip line - echo "WARNING: Line $LINE_NUMBER: \"target\" field is empty! Skipping line!" 1>&2 + echo "$_selfName: in line $LINE_NUMBER: \"target\" field is empty! Skipping line!" 1>&2 continue fi @@ -1132,7 +1134,7 @@ process_batchfile() : else # print out warning and skip line - echo "WARNING: Line $LINE_NUMBER: \"connection-test\" field is empty! Skipping line!" 1>&2 + echo "$_selfName: in line $LINE_NUMBER: \"connection-test\" field is empty! Skipping line!" 1>&2 continue fi @@ -1295,11 +1297,11 @@ process_batchfile() if [[ "$TGFTP_COMMAND_EXIT_VALUE" == "0" ]]; then if [[ ! $autoTuning -eq 0 ]]; then - echo -e "Test #$DATA_LINE_NUMBER was successful!" + echo -e "$_selfName: test #$DATA_LINE_NUMBER was successful!" fi else if [[ ! $autoTuning -eq 0 ]]; then - echo -e "Test #$DATA_LINE_NUMBER failed (for at least one run)!" + echo -e "$_selfName: test #$DATA_LINE_NUMBER failed (for at least one run)!" fi fi @@ -1649,7 +1651,7 @@ while [[ "$1" != "" ]]; do FORCE_LOG_OVERWRITE_SET="0" else # duplicate usage of this parameter - echo "ERROR: The parameter \"--force-log-overwrite\" cannot be used multiple times!" + echo "$_selfName: the parameter \"--force-log-overwrite\" cannot be used multiple times!" 1>&2 exit "$_tgftp_exit_usage" fi @@ -1662,7 +1664,7 @@ while [[ "$1" != "" ]]; do shift 1 else # duplicate usage of this parameter - echo "ERROR: The parameter \"--source|-s\" cannot be used multiple times!" + echo "$_selfName: the parameter \"--source|-s\" cannot be used multiple times!" 1>&2 exit "$_tgftp_exit_usage" fi @@ -1675,7 +1677,7 @@ while [[ "$1" != "" ]]; do shift 1 else # duplicate usage of this parameter - echo "ERROR: The parameter \"--target|-t\" cannot be used multiple times!" + echo "$_selfName: the parameter \"--target|-t\" cannot be used multiple times!" 1>&2 exit "$_tgftp_exit_usage" fi @@ -1686,7 +1688,7 @@ while [[ "$1" != "" ]]; do CONNECTION_TEST_SET="0" else # duplicate usage of this parameter - echo "ERROR: The parameter \"--connection-test|-c\" cannot be used multiple times!" + echo "$_selfName: the parameter \"--connection-test|-c\" cannot be used multiple times!" 1>&2 exit "$_tgftp_exit_usage" fi @@ -1697,7 +1699,7 @@ while [[ "$1" != "" ]]; do AUTO_TUNING_SET="0" else # duplicate usage of this parameter - echo "ERROR: The parameter \"--auto-tune|-a\" cannot be used multiple times!" + echo "$_selfName: the parameter \"--auto-tune|-a\" cannot be used multiple times!" 1>&2 exit "$_tgftp_exit_usage" fi @@ -1710,7 +1712,7 @@ while [[ "$1" != "" ]]; do shift 1 else # duplicate usage of this parameter - echo "ERROR: The parameter \"--timeout|-k\" cannot be used multiple times!" + echo "$_selfName: the parameter \"--timeout|-k\" cannot be used multiple times!" 1>&2 exit "$_tgftp_exit_usage" fi @@ -1723,7 +1725,7 @@ while [[ "$1" != "" ]]; do shift 1 else # duplicate usage of this parameter - echo "ERROR: The parameter \"--batchfile|-f\" cannot be used multiple times!" + echo "$_selfName: the parameter \"--batchfile|-f\" cannot be used multiple times!" 1>&2 exit "$_tgftp_exit_usage" fi @@ -1736,7 +1738,7 @@ while [[ "$1" != "" ]]; do shift 1 else # duplicate usage of this parameter - echo "ERROR: The parameter \"--log-filename\" cannot be used multiple times!" + echo "$_selfName: the parameter \"--log-filename\" cannot be used multiple times!" 1>&2 exit "$_tgftp_exit_usage" fi @@ -1749,7 +1751,7 @@ while [[ "$1" != "" ]]; do shift 1 else # duplicate usage of this parameter - echo "ERROR: The parameter \"--log-comment\" cannot be used multiple times!" + echo "$_selfName: the parameter \"--log-comment\" cannot be used multiple times!" 1>&2 exit "$_tgftp_exit_usage" fi @@ -1762,7 +1764,7 @@ while [[ "$1" != "" ]]; do shift 1 else # duplicate usage of this parameter - echo "ERROR: The parameter \"--pre-command\" cannot be used multiple times!" + echo "$_selfName: the parameter \"--pre-command\" cannot be used multiple times!" 1>&2 exit "$_tgftp_exit_usage" fi @@ -1775,7 +1777,7 @@ while [[ "$1" != "" ]]; do shift 1 else # duplicate usage of this parameter - echo "ERROR: The parameter \"--post-command\" cannot be used multiple times!" + echo "$_selfName: the parameter \"--post-command\" cannot be used multiple times!" 1>&2 exit "$_tgftp_exit_usage" fi @@ -1791,7 +1793,7 @@ if [[ "$GSIFTP_BATCHFILE_SET" == "0" ]]; then process_batchfile "$GSIFTP_BATCHFILE" exit "$?" else - echo "ERROR: batchfile \"$GSIFTP_BATCHFILE\" not existing!" 1>&2 + echo "$_selfName: batchfile \"$GSIFTP_BATCHFILE\" not existing!" 1>&2 exit "$_tgftp_exit_usage" fi @@ -1828,7 +1830,7 @@ if [[ "$GSIFTP_TRANSFER_LOG_FILENAME" != "" && -e "$GSIFTP_TRANSFER_LOG_FILENAME if [[ "$FORCE_LOG_OVERWRITE_SET" == "0" ]]; then : # do nothing, just continue else - echo "ERROR: the logfile named \"$GSIFTP_TRANSFER_LOG_FILENAME\" already exists! Refusing to overwrite!" 1>&2 + echo "$_selfName: the logfile named \"$GSIFTP_TRANSFER_LOG_FILENAME\" already exists! Refusing to overwrite!" 1>&2 exit "$_tgftp_exit_usage" fi fi @@ -1905,7 +1907,7 @@ fi # create FIFO if ! create_fifo $FIFO; then - echo "ERROR: FIFO \"$FIFO\" couldn't be created." 1>&2 + echo "$_selfName: FIFO \"$FIFO\" couldn't be created." 1>&2 exit "$_tgftp_exit_software" fi @@ -2020,7 +2022,7 @@ if [[ -e "$GSIFTP_TRANSFER_LOG_FILENAME" ]]; then # truncate file > "$GSIFTP_TRANSFER_LOG_FILENAME" else - echo "ERROR: the logfile named \"$GSIFTP_TRANSFER_LOG_FILENAME\" already exists! Refusing to overwrite!" 1>&2 + echo "$_selfName: the logfile named \"$GSIFTP_TRANSFER_LOG_FILENAME\" already exists! Refusing to overwrite!" 1>&2 exit "$_tgftp_exit_usage" fi fi @@ -2113,7 +2115,7 @@ if [[ -e "${GSIFTP_TRANSFER_COMMAND}_KILLED" ]]; then "ERROR: \"globus-url-copy\" timed out."\ "\n\n"\ >> "$GSIFTP_TRANSFER_LOG_FILENAME" - echo -e "\nERROR: \"globus-url-copy\" timed out. Please see \""$GSIFTP_TRANSFER_LOG_FILENAME"\" for details." 1>&2 + echo -e "\n$_selfName: \"globus-url-copy\" timed out. Please see \""$GSIFTP_TRANSFER_LOG_FILENAME"\" for details." 1>&2 exit "$_tgftp_exit_timeout" # Was guc interrupted? @@ -2123,7 +2125,7 @@ elif [[ $_gucSIGINTed -eq 1 ]]; then "ERROR: \"globus-url-copy\" was interrupted.\n"\ "\n"\ >> "$GSIFTP_TRANSFER_LOG_FILENAME" - echo -e "\nERROR: \"globus-url-copy\" was interrupted." 1>&2 + echo -e "\n$_selfName: \"globus-url-copy\" was interrupted." 1>&2 if [[ $_sigintReceived -eq 0 ]]; then #echo "($$) DEBUG: SIGINT received." 1>&2 @@ -2214,7 +2216,7 @@ elif [[ "$GSIFTP_TRANSFER_LENGTH" == "" && \ elif [[ "$CONNECTION_TEST_SET" == "0" ]]; then # connection test, no calculation done - echo -e "\nINFO: Connection test => no performance calculation done!" + echo -e "\n$_selfName: connection test => no performance calculation done!" fi ################################################################################ @@ -2231,7 +2233,7 @@ if [[ "$GSIFTP_TRANSFER_POST_COMMAND" != "" && \ wait $! fi -echo -e "\nPlease see \""$GSIFTP_TRANSFER_LOG_FILENAME"\" for details." +echo -e "\n$_selfName: please see \""$GSIFTP_TRANSFER_LOG_FILENAME"\" for details." exit "$GSIFTP_EXIT_VALUE" From 48c489ec2d530abb276b04c974c4498c39c2e4f9 Mon Sep 17 00:00:00 2001 From: Frank Scheiner Date: Fri, 4 Jul 2014 15:39:04 +0200 Subject: [PATCH 03/11] Save tgftp command line in logfile. --- bin/testgftp.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/testgftp.sh b/bin/testgftp.sh index 03ab686..bc2974f 100755 --- a/bin/testgftp.sh +++ b/bin/testgftp.sh @@ -28,7 +28,7 @@ contract number RI-222919. COPYRIGHT -VERSION="0.7.0BETA1" +VERSION="0.7.0BETA2" # The version numbering of tgftp tries to follow the "Semantic Versioning #+ 2.0.0-rc.1" specification avilable on . @@ -41,6 +41,8 @@ _sigintReceived=0 _selfName=$( basename $0 ) +_tgftpCommandLine="$0 $@" + ################################################################################ # EXIT CODES ################################################################################ @@ -2047,6 +2049,12 @@ else fi ################################################################################ +# save tgftp command line +echo -en \ +"\n"\ +"$_tgftpCommandLine\n"\ +"\n"\ +>> "$GSIFTP_TRANSFER_LOG_FILENAME" # save "globus-url-copy" command echo -en \ From b05c2806224a98c853f15792cc4bdf5a1267ef26 Mon Sep 17 00:00:00 2001 From: Frank Scheiner Date: Fri, 4 Jul 2014 15:42:14 +0200 Subject: [PATCH 04/11] Also save transfer list and transfer size in logfile. Missed program output now also modified. --- bin/testgftp.sh | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/bin/testgftp.sh b/bin/testgftp.sh index bc2974f..9c1261f 100755 --- a/bin/testgftp.sh +++ b/bin/testgftp.sh @@ -28,7 +28,7 @@ contract number RI-222919. COPYRIGHT -VERSION="0.7.0BETA2" +VERSION="0.7.0BETA3" # The version numbering of tgftp tries to follow the "Semantic Versioning #+ 2.0.0-rc.1" specification avilable on . @@ -2156,7 +2156,7 @@ elif [[ "$GSIFTP_EXIT_VALUE" != "0" ]]; then "ERROR: \"globus-url-copy\" failed."\ "\n\n"\ >> "$GSIFTP_TRANSFER_LOG_FILENAME" - echo -e "\nERROR: \"globus-url-copy\" failed. Please see \""$GSIFTP_TRANSFER_LOG_FILENAME"\" for details." 1>&2 + echo -e "\n$_selfName: \"globus-url-copy\" failed. Please see \""$GSIFTP_TRANSFER_LOG_FILENAME"\" for details." 1>&2 exit 1 fi @@ -2170,6 +2170,21 @@ if [[ "$CONNECTION_TEST_SET" != "0" && \ ! $_gucSIGINTed -eq 1 \ ]]; then + _tmpTransferList=$( listTransfer/createTransferList "$GSIFTP_SOURCE_URL" "$GSIFTP_TARGET_URL" ) + # save transfer list + echo -en \ +"\n"\ +"$( cat $_tmpTransferList )\n"\ +"\n"\ + >> "$GSIFTP_TRANSFER_LOG_FILENAME" + + # save transfer size + echo -en \ +"\n"\ +"$GSIFTP_TRANSFER_LENGTH B\n"\ +"\n"\ + >> "$GSIFTP_TRANSFER_LOG_FILENAME" + GSIFTP_TRANSFER_RATE=$( tgftp/calcTransferRate "$GSIFTP_START_DATE" "$GSIFTP_END_DATE" "$GSIFTP_TRANSFER_LENGTH" ) # output transfer rate (including time needed for connection) to screen @@ -2204,11 +2219,33 @@ elif [[ "$GSIFTP_TRANSFER_LENGTH" == "" && \ if [[ ! "$_transferList" ]]; then _tmpTransferList=$( listTransfer/createTransferList "$GSIFTP_SOURCE_URL" "$GSIFTP_TARGET_URL" ) _transferSize=$( listTransfer/getTransferSizeFromTransferList "$_tmpTransferList" ) + # save transfer list + echo -en \ +"\n"\ +"$( cat $_tmpTransferList )\n"\ +"\n"\ + >> "$GSIFTP_TRANSFER_LOG_FILENAME" rm -f "$_tmpTransferList" else _transferSize=$( listTransfer/getTransferSizeFromTransferList "$_transferList" ) + # save transfer list + echo -en \ +"\n"\ +"$( cat $_transferList )\n"\ +"\n"\ + >> "$GSIFTP_TRANSFER_LOG_FILENAME" fi + + + #echo "TIMING: After transfer length auto-detection: $( date )" 1>&2 + + # save transfer size + echo -en \ +"\n"\ +"$_transferSize B\n"\ +"\n"\ + >> "$GSIFTP_TRANSFER_LOG_FILENAME" GSIFTP_TRANSFER_RATE=$( tgftp/calcTransferRate "$GSIFTP_START_DATE" "$GSIFTP_END_DATE" "$_transferSize" ) From 66e2145aa4ed95836099ea9153dc009f33bfe427 Mon Sep 17 00:00:00 2001 From: Frank Scheiner Date: Fri, 4 Jul 2014 15:45:20 +0200 Subject: [PATCH 05/11] Allow disabling of data channel authentication. --- bin/testgftp.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/bin/testgftp.sh b/bin/testgftp.sh index 9c1261f..c4f1fd3 100755 --- a/bin/testgftp.sh +++ b/bin/testgftp.sh @@ -28,7 +28,7 @@ contract number RI-222919. COPYRIGHT -VERSION="0.7.0BETA3" +VERSION="0.7.0BETA4" # The version numbering of tgftp tries to follow the "Semantic Versioning #+ 2.0.0-rc.1" specification avilable on . @@ -1425,9 +1425,16 @@ listTransfer/createTransferList() { else local _recursive="" fi + + # disable data channel authentication if requested + if [[ $noDataChannelAuthSet -eq 0 ]]; then + local _dataChannelAuth="-nodcau" + else + local _dataChannelAuth="" + fi # to get the transfer list we use guc with "-do" option - globus-url-copy -do "$$_transferList" $_recursive "$_source" "$_destination" + globus-url-copy -do "$$_transferList" $_recursive $_dataChannelAuth "$_source" "$_destination" &>/dev/null if [[ "$?" == "0" && -e "$$_transferList" ]]; then # strip comment lines @@ -1886,6 +1893,14 @@ else #+ for transfer size and performance calculation also use "-r") recursiveTransferSet=0 fi + + # -nodcau + noDataChannelAuthSet=1 + GREP=$( echo $GSIFTP_PARAMS | $EGREP_BIN -o "\-nodcau" ) + if [[ "$GREP" != "" ]]; then + # disable data channel authentication + noDataChannelAuthSet=0 + fi fi ################################################################################ From 3ffe94b543a0a3e806e353398116557612f73dce Mon Sep 17 00:00:00 2001 From: Frank Scheiner Date: Fri, 4 Jul 2014 15:47:30 +0200 Subject: [PATCH 06/11] Enabled extraction of new logfile fields TGFTP_COMMAND, GSIFTP_TRANSFER_LIST and GSIFTP_TRANSFER_SIZE. Modified program output to include program name. --- bin/testgftp_log.sh | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/bin/testgftp_log.sh b/bin/testgftp_log.sh index 0a1dc86..c71492b 100755 --- a/bin/testgftp_log.sh +++ b/bin/testgftp_log.sh @@ -4,7 +4,7 @@ :<&2 exit 1 fi @@ -157,7 +162,7 @@ while [[ "$1" != "" ]]; do ATTRIBUTE_SET="0" shift 1 else - echo "ERROR: the parameter \"--get-attribute|-a\" can not be used multiple times." + echo "$SELF_NAME: the parameter \"--get-attribute|-a\" can not be used multiple times." 1>&2 exit 1 fi @@ -166,9 +171,21 @@ while [[ "$1" != "" ]]; do done if [[ $(echo $SUPPORTED_ATTS | grep -o $ATTRIBUTE) == "" ]]; then - echo "ERROR: The Attribute \"$ATTRIBUTE\" is not supported!" + echo "$SELF_NAME: the attribute \"$ATTRIBUTE\" is not supported!" 1>&2 + exit 1 +fi + +if [[ ! -e "$LOGFILE" ]]; then + echo "$SELF_NAME: the logfile \"$LOGFILE\" does not exist!" 1>&2 exit 1 fi -sed -n -e "/<$ATTRIBUTE>/,/<\/$ATTRIBUTE>/p" <"$LOGFILE" | sed -e "/^<.*$ATTRIBUTE>$/d" +ATTRIBUTE_VALUE=$( sed -n -e "/<$ATTRIBUTE>/,/<\/$ATTRIBUTE>/p" <"$LOGFILE" | sed -e "/^<.*$ATTRIBUTE>$/d" ) + +if [[ "$ATTRIBUTE_VALUE" == "" ]]; then + + echo "$SELF_NAME: attribute \"$ATTRIBUTE\" not found in \"$LOGFILE\" or empty." 1>&2 +else + echo "$ATTRIBUTE_VALUE" +fi From 61912f69fa07ba77251e302eb070dca22b08a417 Mon Sep 17 00:00:00 2001 From: Frank Scheiner Date: Fri, 4 Jul 2014 15:59:00 +0200 Subject: [PATCH 07/11] The guc command is now executed in the foreground. Any possibly inherited signal handler for SIGINT is reset to the default handler at program start. Both modifications were needed for gsatellite to be able to successfully interrupt and continue a gtransfer job (which uses tgftp for data transfer). These modifications do not change functionality AFAICS. --- bin/testgftp.sh | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/bin/testgftp.sh b/bin/testgftp.sh index c4f1fd3..2f3fb41 100755 --- a/bin/testgftp.sh +++ b/bin/testgftp.sh @@ -28,7 +28,10 @@ contract number RI-222919. COPYRIGHT -VERSION="0.7.0BETA4" +# Reset the signal handler (possibly inherited from the caller) for SIGINT +trap - SIGINT + +VERSION="0.7.0BETA5" # The version numbering of tgftp tries to follow the "Semantic Versioning #+ 2.0.0-rc.1" specification avilable on . @@ -1961,7 +1964,12 @@ echo "exec globus-url-copy" \ #+ prior to the execution of the guc command. GSIFTP_START_DATE=$($DATE_BIN +%s) -bash "$GSIFTP_TRANSFER_COMMAND" & +#bash "$GSIFTP_TRANSFER_COMMAND" & +if [[ ! $GSIFTP_TIMEOUT -eq 0 ]]; then + timeout "$GSIFTP_TIMEOUT" bash "$GSIFTP_TRANSFER_COMMAND" +else + bash "$GSIFTP_TRANSFER_COMMAND" +fi #globus-url-copy \ #$GSIFTP_DEFAULT_PARAMS \ @@ -1969,15 +1977,15 @@ bash "$GSIFTP_TRANSFER_COMMAND" & #"$GSIFTP_SOURCE_URL" \ #"$GSIFTP_TARGET_URL" &>$FIFO & -GSIFTP_TRANSFER_COMMAND_PID="$!" +#GSIFTP_TRANSFER_COMMAND_PID="$!" # kill command after timeout -if [[ ! $GSIFTP_TIMEOUT -eq 0 ]]; then - kill_after_timeout "$GSIFTP_TRANSFER_COMMAND_PID" "$GSIFTP_TIMEOUT" & -fi +#if [[ ! $GSIFTP_TIMEOUT -eq 0 ]]; then +# kill_after_timeout "$GSIFTP_TRANSFER_COMMAND_PID" "$GSIFTP_TIMEOUT" & +#fi # wait for pid and discard "lengthy" output -wait "$GSIFTP_TRANSFER_COMMAND_PID" &>/dev/null +#wait "$GSIFTP_TRANSFER_COMMAND_PID" &>/dev/null # NOTICE: #+ If tgftp is used interactively, when hitting "Ctrl+C" and tgftp is already From dc784f7b0a43479d449f7d396cc98f8a560a668a Mon Sep 17 00:00:00 2001 From: Frank Scheiner Date: Fri, 4 Jul 2014 16:00:17 +0200 Subject: [PATCH 08/11] Unset variable that is otherwise used by mktemp (used in SLES) as dir prefix for temp files. --- bin/testgftp.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/testgftp.sh b/bin/testgftp.sh index 2f3fb41..0fbb1c3 100755 --- a/bin/testgftp.sh +++ b/bin/testgftp.sh @@ -31,7 +31,11 @@ COPYRIGHT # Reset the signal handler (possibly inherited from the caller) for SIGINT trap - SIGINT -VERSION="0.7.0BETA5" +# This is needed on SLES10, as otherwise, mktemp will use this env var as dir +# for its created files there (see manpage for details). +unset TMPDIR + +VERSION="0.7.0BETA6" # The version numbering of tgftp tries to follow the "Semantic Versioning #+ 2.0.0-rc.1" specification avilable on . From 8e917f5047f4eb76677fdc2b4c20ce9cbccf3942 Mon Sep 17 00:00:00 2001 From: Frank Scheiner Date: Thu, 17 Jul 2014 14:22:41 +0200 Subject: [PATCH 09/11] Some cosmetic changes. Removed BETA tag. --- bin/testgftp.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/testgftp.sh b/bin/testgftp.sh index 0fbb1c3..6707082 100755 --- a/bin/testgftp.sh +++ b/bin/testgftp.sh @@ -35,7 +35,7 @@ trap - SIGINT # for its created files there (see manpage for details). unset TMPDIR -VERSION="0.7.0BETA6" +VERSION="0.7.0" # The version numbering of tgftp tries to follow the "Semantic Versioning #+ 2.0.0-rc.1" specification avilable on . @@ -1878,6 +1878,8 @@ else GREP=$( echo $GSIFTP_PARAMS | $EGREP_BIN -o "\-len [[:alnum:]]*|\-partial-length [[:alnum:]]*" | $GREP_BIN -o " [[:alnum:]]*" ) if [[ "$GREP" != "" ]]; then GSIFTP_TRANSFER_LENGTH="$GREP" + # Trim whitspace + GSIFTP_TRANSFER_LENGTH=${GSIFTP_TRANSFER_LENGTH// /} else # use default values GSIFTP_DEFAULT_PARAMS="$GSIFTP_DEFAULT_PARAMS $GSIFTP_TRANSFER_LENGTH_PARAM $GSIFTP_TRANSFER_LENGTH" @@ -2205,10 +2207,14 @@ if [[ "$CONNECTION_TEST_SET" != "0" && \ "\n"\ >> "$GSIFTP_TRANSFER_LOG_FILENAME" + sizeUnit=$( get_unit $GSIFTP_TRANSFER_LENGTH ) + # remove any trailing size unit from transfer size + GSIFTP_TRANSFER_LENGTH_W_O_UNIT=${GSIFTP_TRANSFER_LENGTH%%[[:alpha:]]} + # save transfer size echo -en \ "\n"\ -"$GSIFTP_TRANSFER_LENGTH B\n"\ +"$GSIFTP_TRANSFER_LENGTH_W_O_UNIT $sizeUnit\n"\ "\n"\ >> "$GSIFTP_TRANSFER_LOG_FILENAME" From aa0f410a2fced51417a4b7d505e5dd625e538917 Mon Sep 17 00:00:00 2001 From: Frank Scheiner Date: Thu, 17 Jul 2014 14:23:06 +0200 Subject: [PATCH 10/11] Incremented version number. --- bin/testgftp_log.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/testgftp_log.sh b/bin/testgftp_log.sh index c71492b..7c333d3 100755 --- a/bin/testgftp_log.sh +++ b/bin/testgftp_log.sh @@ -41,7 +41,7 @@ GSIFTP_TRANSFER_SIZE GSIFTP_TRANSFER_LIST TGFTP_COMMAND" -VERSION="0.1.0" +VERSION="0.2.0" SELF_NAME=$( basename $0 ) From 26035dea061d4d21019da5fbc3e396996a9936b9 Mon Sep 17 00:00:00 2001 From: Frank Scheiner Date: Thu, 17 Jul 2014 14:24:43 +0200 Subject: [PATCH 11/11] Increased tools version number and updated ChangeLog. --- ChangeLog | 18 ++++++++++++++++++ VERSION | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d45a61c..1bd69dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2014-07-17 Frank Scheiner + +tgftp tools v0.7.0: + +*0.7.0 (tgftp): +Introduced new logfile fields for transfer list, transfer size and used tgftp +command (GSIFTP_TRANSFER_LIST, GSIFTP_TRANSFER_SIZE, TGFTP_COMMAND). These new +fields (in addition to the already supported fields) allow for a detailed +reproduction of a test. This is useful for reproducing and confirming test +results. Also updated program output for easer recognition. Added support for +disabling the data channel authentication to allow tests with Debian based +GridFTP servers, which have problems with data channel authentication. The guc +transfer command is now executed in the foreground (needed for successful job +hold and release of a gtransfer job by gsatellite). + +*0.2.0 (tgftp_log): +Added support for the newly added logfile fields. + 2013-01-25 Frank Scheiner tgftp dist v0.6.1: diff --git a/VERSION b/VERSION index ee6cdce..faef31a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.6.1 +0.7.0