From: Eduardo Ramos Testillano Date: Sat, 29 Oct 2016 14:22:50 +0000 (+0200) Subject: improvs. X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=commitdiff_plain;h=16cbbdb948dba9ac61b26fd7972198cb5e0438e7 improvs. --- diff --git a/example/diameter/launcher/deployments/st-client/checkStatus.sh b/example/diameter/launcher/deployments/st-client/checkStatus.sh index ca132a8..fc14686 100755 --- a/example/diameter/launcher/deployments/st-client/checkStatus.sh +++ b/example/diameter/launcher/deployments/st-client/checkStatus.sh @@ -1,4 +1,5 @@ #!/bin/bash +# Result code: 1 (miss instances (and connections)), 2 (miss connections) ADML_CONNECTIONS=`cat .st_conf_adml_connections 2>/dev/null` ADML_INSTANCES=`cat .st_conf_adml_instances 2>/dev/null` RESULT_CODE=0 @@ -16,10 +17,10 @@ fi ADML_CONNECTIONS_ALIVE=$(netstat -a | grep :diameter | grep ESTABLISHED | wc -l) ADML_TOTAL_CONNECTIONS=$((ADML_CONNECTIONS*ADML_INSTANCES)) echo -n "$ADML_CONNECTIONS_ALIVE connections established" -if [ $ADML_CONNECTIONS_ALIVE -ne $ADML_TOTAL_CONNECTIONS ] && RESULT_CODE=1 +if [ $ADML_CONNECTIONS_ALIVE -ne $ADML_TOTAL_CONNECTIONS ] then echo " ! (expected $ADML_TOTAL_CONNECTIONS configured)" - RESULT_CODE=1 + [ $RESULT_CODE -ne 1 ] && RESULT_CODE= else echo fi diff --git a/example/diameter/launcher/deployments/st-client/configure.sh b/example/diameter/launcher/deployments/st-client/configure.sh index aac19ab..21e3112 100755 --- a/example/diameter/launcher/deployments/st-client/configure.sh +++ b/example/diameter/launcher/deployments/st-client/configure.sh @@ -62,7 +62,7 @@ calculate_deployment_layout() { do instances=$(ceil $max_connections $conn) echo -n -e "\t$instances" - [ $conn -eq 2 ] && instances__dflt=$instances + [ $conn -eq 1 ] && instances__dflt=$instances done echo echo -e "Connects per instance:\t10\t9\t8\t7\t6\t5\t4\t3\t2\t1" diff --git a/example/diameter/launcher/deployments/st-client/launchCPS.sh b/example/diameter/launcher/deployments/st-client/launchCPS.sh index 08bf495..44d993a 100755 --- a/example/diameter/launcher/deployments/st-client/launchCPS.sh +++ b/example/diameter/launcher/deployments/st-client/launchCPS.sh @@ -30,11 +30,13 @@ if [ "$desired_rate" != "" ] then rate_per_instance=$((desired_rate/$ADML_INSTANCES)) fi -echo "This configures $rate_per_instance test cases per second and instance" -echo " (there are $ADML_INSTANCES instances available)". +CMD="./operation.sh \"test|ttps|$rate_per_instance\"" + +echo +echo "As we have $ADML_INSTANCES instances available, we shall launch $rate_per_instance test cases" +echo " per second and instance ($CMD)." echo echo "Press ENTER to continue, CTRL-C to abort ..." read dummy - -./operation.sh "test|ttps|$rate_per_instance" +$CMD diff --git a/example/diameter/launcher/deployments/st-client/program.sh b/example/diameter/launcher/deployments/st-client/program.sh index 53090ab..31eb97d 100755 --- a/example/diameter/launcher/deployments/st-client/program.sh +++ b/example/diameter/launcher/deployments/st-client/program.sh @@ -8,7 +8,7 @@ RATE_PER_INSTANCE=`cat .st_conf_rate_per_instance 2>/dev/null` DESIRED_RATE=`cat .st_conf_desired_rate 2>/dev/null` REPEATS=`cat .st_conf_cycle_repeats 2>/dev/null` PROGRAM_LAYOUT_FILE=.st_conf_n_testcases_program_layout -[ -z "$ADML_CONCURRENT_PROVISION_JOBS" ] && ADML_CONCURRENT_PROVISION_JOBS=10 +[ -z "$ADML_CONCURRENT_PROVISION_JOBS" ] && ADML_CONCURRENT_PROVISION_JOBS=20 ############# # FUNCTIONS # @@ -89,6 +89,8 @@ advice_to_squeeze_idle_cpu () { echo "Idle cpu now: $idle. Check the system CPU with top. If is not overcommited, consider" echo " increase the environment variable 'ADML_CONCURRENT_PROVISION_JOBS' (now $ADML_CONCURRENT_PROVISION_JOBS)." echo + echo "Press ENTER to continue ..." + read dummy } ############# @@ -108,7 +110,7 @@ echo "Testcases programming ..." echo cd `dirname $0` ./checkStatus.sh -[ $? -ne 0 ] && _exit "Fix status to continue ..." +[ $? -eq 1 ] && _exit "Fix status to continue ..." # We launch in background ! #./operation.sh --ping >/dev/null