--- /dev/null
+#!/bin/bash
+ADML_CONNECTIONS=`cat .st_conf_adml_connections 2>/dev/null`
+ADML_INSTANCES=`cat .st_conf_adml_instances 2>/dev/null`
+RESULT_CODE=0
+
+ADML_INSTANCES_ALIVE=$(pgrep ADML- | wc -l)
+echo -n "$ADML_INSTANCES_ALIVE instances alive"
+if [ $ADML_INSTANCES_ALIVE -ne $ADML_INSTANCES ]
+then
+ echo " ! (expected $ADML_INSTANCES configured)"
+ RESULT_CODE=1
+else
+ echo
+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
+then
+ echo " ! (expected $ADML_TOTAL_CONNECTIONS configured)"
+ RESULT_CODE=1
+else
+ echo
+fi
+
+exit $RESULT_CODE
+
--- /dev/null
+#!/bin/bash
+
+#############
+# VARIABLES #
+#############
+ADML_INSTANCES=`cat .st_conf_adml_instances 2>/dev/null`
+
+#############
+# FUNCTIONS #
+#############
+_exit() {
+ echo
+ echo $1
+ echo
+ exit 1
+}
+
+#############
+# EXECUTION #
+#############
+echo
+echo
+cd `dirname $0`
+./checkStatus.sh
+[ $? -ne 0 ] && _exit "Fix status to continue ..."
+echo
+echo "Input desired rate (test cases per second) to start testing [0: stop if active]:"
+read desired_rate
+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)".
+echo
+echo "Press ENTER to continue, CTRL-C to abort ..."
+read dummy
+
+./operation.sh "test|ttps|$rate_per_instance"
+
then
start_testing=yes
else
- echo "Input desired rate (test cases per second) to start testing [0: nothing done]:"
- read desired_rate
- if [ "$desired_rate" != "" ]
- then
- rate_per_instance=$((desired_rate/$ADML_INSTANCES))
- [ $rate_per_instance -lt 1 ] && rate_per_instance=1
- ./operation.sh "test|ttps|$rate_per_instance"
- else
- cat << EOF
+ cat << EOF
To start testing, you must use the './operation.sh' script. The most
common commands used for testing are:
For a complete and detailed information, execute: ./operation.sh --help | less
+You could also use './launchCPS.sh' script.
+
EOF
- fi
fi
if [ -n "$start_testing" ]
wait $(jobs -p)
sleep 3
+./checkStatus.sh
cat << EOF
$(pgrep ADML- | wc -l) instances alive !