Execute 'example/diameter/launcher/deploy-aots.sh' and follow instructions.
-### AOTS ADML Agent
-
-Execute 'example/diameter/launcher/deploy-aots-adml.sh' and follow instructions.
-
## Documentation
See README.md file at installation target directory.
--- /dev/null
+#!/bin/bash
+
+#############
+# VARIABLES #
+#############
+SCR_DIR=`readlink -f $0 | xargs dirname`
+PROJECT_ROOT=$(readlink -f $SCR_DIR/../../..)
+
+#############
+# FUNCTIONS #
+#############
+_exit () {
+ local msg="$1"
+ local rc=$2
+ [ -z "$rc" ] && rc=1
+
+ # Exit message:
+ [ -n "$msg" ] && echo -e "\n${msg}\n"
+
+ exit $rc
+}
+
+#############
+# EXECUTION #
+#############
+
+echo
+echo "------------------------------------------------------"
+echo " ADML with HTTP support installation "
+echo "------------------------------------------------------"
+echo
+[ -d $PROJECT_ROOT/build/Release ] && VARIANT=Release
+[ -d $PROJECT_ROOT/build/Debug ] && VARIANT=Debug
+[ -z "$VARIANT" ] && _exit "Cannot locate neither 'Release' nor 'Debug' variant !"
+build_type_letter=$(echo $VARIANT | cut -c1 | tr '[:upper:]' '[:lower:]')
+
+version__dflt=v"`date +'%y'`.`date +'%m'`.`date +'%d'`$build_type_letter"
+INSTALL__dflt=$HOME/3rdParty/anna-adml-http-builds/v"`date +'%y'`.`date +'%m'`.`date +'%d'`$build_type_letter"
+
+echo "Choose the target path for installation [$INSTALL__dflt]:"
+echo " (enter a non-existent directory)"
+read INSTALL
+[ -z "$INSTALL" ] && INSTALL=$INSTALL__dflt
+INSTALL=`readlink -m $INSTALL`
+[ -d $INSTALL ] && _exit "The target installation directory ($INSTALL) already exists ! (if you want to reinstall, remove it first)"
+
+echo
+echo "Stage 1: Deploying resources ......................"
+echo
+mkdir -p $INSTALL
+cp -rL $SCR_DIR/deployments/adml/* $INSTALL
+
+# VARIABLES ######################################
+# Sources:
+LDIR=${PROJECT_ROOT}/example/diameter/launcher
+BIN_DIR=${PROJECT_ROOT}/build/$VARIANT/bin
+LIB_DIR=${PROJECT_ROOT}/build/$VARIANT/lib
+
+# Targets:
+ADML=${INSTALL}
+DTDs=${ADML}/DTDs
+DYNLIBS=${ADML}/dynlibs
+##################################################
+
+echo
+echo "Variant: $VARIANT"
+echo
+
+# Empty directories:
+mkdir -p ${ADML}/counters
+mkdir -p ${ADML}/test-reports
+
+# Scripts:
+cp ${PROJECT_ROOT}/example/diameter/launcher/resources/scripts/operation_curl.sh ${ADML}/operation.sh
+
+# Templates:
+mkdir $DTDs
+cp ${PROJECT_ROOT}/include/anna/diameter/codec/message.dtd ${DTDs}
+cp ${PROJECT_ROOT}/include/anna/diameter/stack/dictionary.dtd ${DTDs}
+cp ${PROJECT_ROOT}/example/diameter/launcher/resources/services_examples/services.dtd ${DTDs}
+
+# Main Launcher and dynamic libraries:
+cp ${BIN_DIR}/anna_diameter_launcher ${ADML}/ADML
+cp -r $LIB_DIR/dynamic/launcher ${DYNLIBS}
+cp $LIB_DIR/libanna_testing_shared.so ${DYNLIBS}
+
+# Get stuff from leaf directories:
+cd $LIB_DIR/dynamic/launcher
+leafs=( $(find . -type d -links 2) )
+cd - >/dev/null
+
+cd ${PROJECT_ROOT}/dynamic/launcher
+for dir in ${leafs[@]}
+do
+ cp $dir/*.xml ${DYNLIBS}/$dir 2>/dev/null
+ cp $dir/dynamic.suffix ${DYNLIBS}/$dir 2>/dev/null
+ cp -r $dir/services ${DYNLIBS}/$dir 2>/dev/null
+done
+cd - >/dev/null
+
+# ADML dynamic libs selection script:
+cp ${LDIR}/resources/scripts/select_dynlib.sh ${DYNLIBS}/select.sh
+
+# Default dynamic library:
+cd ${DYNLIBS}
+ln -sf default/libanna_launcher_procedure_default_shared.so
+cd - >/dev/null
+
+# ADML Agent shall use http server:
+httpOpt="--httpServer \`grep -v ^# .httpServer\`"
+echo "${httpOpt}" >> ${ADML}/args.ft
+echo "${httpOpt}" >> ${ADML}/args.st
+echo "localhost:8000" > ${ADML}/.httpServer
+
+# Remove AOTS actions:
+rm ${ADML}/ACTIONS.md
+
+_exit "Done!" 0
+
+++ /dev/null
-#!/bin/bash
-
-#############
-# VARIABLES #
-#############
-SCR_DIR=`readlink -f $0 | xargs dirname`
-PROJECT_ROOT=$(readlink -f $SCR_DIR/../../..)
-
-#############
-# FUNCTIONS #
-#############
-_exit () {
- local msg="$1"
- local rc=$2
- [ -z "$rc" ] && rc=1
-
- # Exit message:
- [ -n "$msg" ] && echo -e "\n${msg}\n"
-
- exit $rc
-}
-
-#############
-# EXECUTION #
-#############
-
-echo
-echo "------------------------------------------------------"
-echo " AOTS ADML Agent installation "
-echo "------------------------------------------------------"
-echo
-[ -d $PROJECT_ROOT/build/Release ] && VARIANT=Release
-[ -d $PROJECT_ROOT/build/Debug ] && VARIANT=Debug
-[ -z "$VARIANT" ] && _exit "Cannot locate neither 'Release' nor 'Debug' variant !"
-build_type_letter=$(echo $VARIANT | cut -c1 | tr '[:upper:]' '[:lower:]')
-
-version__dflt=v"`date +'%y'`.`date +'%m'`.`date +'%d'`$build_type_letter"
-INSTALL__dflt=$HOME/3rdParty/anna-aots-adml-builds/v"`date +'%y'`.`date +'%m'`.`date +'%d'`$build_type_letter"
-
-echo "Choose the target path for installation [$INSTALL__dflt]:"
-echo " (enter a non-existent directory)"
-read INSTALL
-[ -z "$INSTALL" ] && INSTALL=$INSTALL__dflt
-INSTALL=`readlink -m $INSTALL`
-[ -d $INSTALL ] && _exit "The target installation directory ($INSTALL) already exists ! (if you want to reinstall, remove it first)"
-
-echo
-echo "Stage 1: Deploying resources ......................"
-echo
-mkdir -p $INSTALL
-cp -rL $SCR_DIR/deployments/aots-adml/* $INSTALL
-
-# VARIABLES ######################################
-# Sources:
-LDIR=${PROJECT_ROOT}/example/diameter/launcher
-BIN_DIR=${PROJECT_ROOT}/build/$VARIANT/bin
-LIB_DIR=${PROJECT_ROOT}/build/$VARIANT/lib
-
-# Targets:
-ADML=${INSTALL}
-DTDs=${ADML}/DTDs
-DYNLIBS=${ADML}/dynlibs
-##################################################
-
-echo
-echo "Variant: $VARIANT"
-echo
-
-# Empty directories:
-mkdir -p ${ADML}/counters
-mkdir -p ${ADML}/test-reports
-
-# Scripts:
-cp ${PROJECT_ROOT}/example/diameter/launcher/resources/scripts/operation_curl.sh ${ADML}/operation.sh
-
-# Templates:
-mkdir $DTDs
-cp ${PROJECT_ROOT}/include/anna/diameter/codec/message.dtd ${DTDs}
-cp ${PROJECT_ROOT}/include/anna/diameter/stack/dictionary.dtd ${DTDs}
-cp ${PROJECT_ROOT}/example/diameter/launcher/resources/services_examples/services.dtd ${DTDs}
-
-# Main Launcher and dynamic libraries:
-cp ${BIN_DIR}/anna_diameter_launcher ${ADML}/ADML
-cp -r $LIB_DIR/dynamic/launcher ${DYNLIBS}
-cp $LIB_DIR/libanna_testing_shared.so ${DYNLIBS}
-
-# Get stuff from leaf directories:
-cd $LIB_DIR/dynamic/launcher
-leafs=( $(find . -type d -links 2) )
-cd - >/dev/null
-
-cd ${PROJECT_ROOT}/dynamic/launcher
-for dir in ${leafs[@]}
-do
- cp $dir/*.xml ${DYNLIBS}/$dir 2>/dev/null
- cp $dir/dynamic.suffix ${DYNLIBS}/$dir 2>/dev/null
- cp -r $dir/services ${DYNLIBS}/$dir 2>/dev/null
-done
-cd - >/dev/null
-
-# ADML dynamic libs selection script:
-cp ${LDIR}/resources/scripts/select_dynlib.sh ${DYNLIBS}/select.sh
-
-# Default dynamic library:
-cd ${DYNLIBS}
-ln -sf default/libanna_launcher_procedure_default_shared.so
-cd - >/dev/null
-
-# ADML Agent shall use http server:
-httpOpt="--httpServer \`grep -v ^# .httpServer\`"
-echo "${httpOpt}" >> ${ADML}/args.ft
-echo "${httpOpt}" >> ${ADML}/args.st
-echo "localhost:8000" > ${ADML}/.httpServer
-
-_exit "Done!" 0
-
--- /dev/null
+# ADML actions
+
+## send_xml_to_entity
+
+Sends a diameter message in xml format (see DTDs/message.dtd) as client to the server(s) configured.
+
+Arguments: xml[, answers_to]
+* xml: the diameter message in xml format.
+* answers_to: optional step number of a 'wait_xml_from_entity' for a request message.
+ Steps are the actions numbered from 1 to N
+Example(1):
+```
+- action: AF/send_xml_to_entity
+ xml: aar-initial.xml
+```
+
+Example(2):
+```
+- action: AF/wait_xml_from_entity
+ arguments:
+ xml: dpr.xml
+
+- action: AF/send_xml_to_entity
+ arguments:
+ xml: dpa.xml
+ answers_to: 1
+```
+
+## wait_xml_from_entity
+
+Waits a diameter message in xml format (see DTDs/message.dtd) as client from the server(s) connected.
+Step blocks until match reception (regular expressions could be used).
+
+Arguments: xml
+* xml: the diameter message in xml format.
+
+Example:
+```
+- action: AFPC/wait_xml_from_entity
+ arguments:
+ xml: aaa.xml
+```
+
+## send_xml_to_client
+
+Sends a diameter message in xml format (see DTDs/message.dtd) as server to any client(s) connected.
+
+Arguments: xml[, answers_to]
+* xml: the diameter message in xml format.
+* answers_to: optional step number of a 'wait_xml_from_client' for a request message.
+ Steps are the actions numbered from 1 to N
+Example(1):
+```
+- action: AF/send_xml_to_client
+ arguments:
+ xml: dpr.xml
+```
+
+Example(2):
+```
+- action: AFPC/wait_xml_from_client
+ xml: dpr.xml
+ arguments:
+
+- action: AFPC/send_xml_to_client
+ xml: dpa.xml
+ arguments:
+```
+
+## wait_xml_from_client
+
+Waits a diameter message in xml format (see DTDs/message.dtd) as server from the client(s) connected.
+Step blocks until match reception (regular expressions could be used).
+
+Arguments: xml
+* xml: the diameter message in xml format.
+
+Example:
+```
+- action: AFPC/wait_xml_from_client
+ arguments:
+ xml: dpr.xml
+```
+
--- /dev/null
+# ADML hints
+
+## AF-Application-Identifier
+
+Diameter RFC assigned the format 'OctetString' to this AVP although it is almost always intended to be human-readable. 'UTF8String' format could be more appropiate, but probably the intention was to avoid possible limits.
+
+ADML message codec shows readable data when possible using the field 'data'. When this is not possible, the 'hex-data' field will encode the information. The 'OctetString' format is hexadecimal by nature (string of octets), then always 'hex-data' will be shown for this kind of AVPs.
+
+For example:
+<avp name="AF-Application-Identifier" hex-data="75726e25334175726e2d787878253341336770702d736572766963652e696d732e696373692e6d6d74656c"/>
+
+You could decode using hex dump utility: 'xxd'
+
+$> echo "75726e25334175726e2d787878253341336770702d736572766963652e696d732e696373692e6d6d74656c" | xxd -p -r
+$> urn%3Aurn-xxx%3A3gpp-service.ims.icsi.mmtel
+
+But the thing that you may probably need, is to encode a desired value into xml messages while designing a test case. For this situation, use the opossite (drop reverse flag '-r' to xxd):
+
+$> echo -n "urn%3Aurn-xxx%3A3gpp-service.ims.icsi.mmtel" | xxd -p | tr -d '\n'
+$> 75726e25334175726e2d787878253341336770702d736572766963652e696d732e696373692e6d6d74656c
+
+or use 'od' (files dump) utility:
+
+$> echo -n "urn%3Aurn-xxx%3A3gpp-service.ims.icsi.mmtel" | od -A n -t x1 | tr -d ' ' | tr -d '\n'
+$> 75726e25334175726e2d787878253341336770702d736572766963652e696d732e696373692e6d6d74656c
+
+The '-n' in the echo is neccessary to avoid encoding of carriage return (0x0a) for the string provided.
+
--- /dev/null
+# ADML will start with base protocol dictionary and no nodes on services.xml:
+--services services.xml
+
+# Counters directory:
+--cntDir counters
+# Counters record procedure period in milliseconds.
+# If missing, default value of 300000 (5 minutes) will be assigned.
+# Zero value, disable the dump procedure.
+#--cntRecordPeriod 10000
+
+# System test:
+--tmDir test-reports
+# To override traffic logs configuration in order to be disabled for all the
+# loaded nodes, launch the process by mean: './start.sh st'
+
+# Statistics:
+--logStatisticSamples all
+
+# Add to take debug traces once started
+--trace debug
+
--- /dev/null
+# ADML will start with base protocol dictionary and no nodes on services.xml:
+--services services.xml
+
+# Counters directory:
+--cntDir counters
+# Counters record procedure period in milliseconds.
+# If missing, default value of 300000 (5 minutes) will be assigned.
+# Zero value, disable the dump procedure.
+#--cntRecordPeriod 10000
+
+# System test:
+--tmDir test-reports
+# To override traffic logs configuration in order to be disabled for all the
+# loaded nodes, launch the process by mean: './start.sh st'
+
+# Statistics:
+--logStatisticSamples all
+
+# Add to take debug traces once started
+# --trace debug
+--disableLogs
+
--- /dev/null
+<services>
+ <!--
+ Stacks
+
+ * Monostack: you could select any id value, normally 0.
+ * Multistack: use the application id for the id value.
+ This eases codec engine selection for
+ processed messages.
+ -->
+ <stack id="0" dictionary="dictionary.xml" fixMode="Never"/>
+
+ <!--
+ Nodes
+
+ * Client example:
+
+ <node originHost="<origin host>" applicationId="<application id>"
+ entity="<addr1:port1[,addr2:port2]...[,addrN:portN]>"
+ cer="<cer xml file>" answersTimeout="300000" dumpLog="yes"/>
+
+ * Server example:
+
+ <node originHost="<origin host>" applicationId="<application id>"
+ diameterServer="<addr:port>" diameterServerSessions="10"
+ cea="<cea xml file>" answersTimeout="300000" dumpLog="yes"/>
+ -->
+ <node originHost="afHost.afRealm.com" applicationId="0" entity="localhost:3868"/>
+
+</services>
--- /dev/null
+../../resources/stack_examples
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+# $1: args type could be 'ft' (function test) or 'st' (system test). By default: ft
+function pgrep_live {
+ pids=$(pgrep "$1");
+ [ "$pids" ] || return;
+ ps -o s= -o pid= $pids | sed -n 's/^[^ZT][[:space:]]\+//p';
+}
+cd `dirname $0`
+ARGS=args.$1
+[ -z "$1" ] && ARGS=args.ft
+STARTED=`pgrep_live ADML`
+[ -n "$STARTED" ] && { echo "Already started !"; echo "PID $STARTED" ; exit 1 ; }
+0> launcher.trace
+for file in `ls *.launcher.log 2>/dev/null`; do 0> $file; done
+mkdir -p counters test-reports
+rm -f counters/* test-reports/* *.csv
+export LD_LIBRARY_PATH=$PWD/dynlibs
+eval ./ADML `grep -v ^# $ARGS` &
+echo $! > .pid
+echo "Done !"
+
--- /dev/null
+#!/bin/bash
+function pgrep_live {
+ pids=$(pgrep "$1");
+ [ "$pids" ] || return;
+ ps -o s= -o pid= $pids | sed -n 's/^[^ZT][[:space:]]\+//p';
+}
+cd `dirname $0`
+PID=$(pgrep_live ^ADML)
+[ -z "$PID" ] && exit 0
+kill $PID
+
+# Protection to force kill (with SIGKILL) if ADML still alive after certain time:
+seconds2force=3
+count=$((10*seconds2force))
+kill0=0
+while [ $kill0 -eq 0 -a $count -gt 0 ]
+do
+ sleep 0.1
+ count=$((count-1))
+ kill -0 $PID 2>/dev/null
+ kill0=$?
+ echo -n .
+done
+[ $kill0 -eq 0 ] && { echo " sigkill to ADML pid $PID !" ; kill -9 $PID ; }
+rm -f .pid
+
+++ /dev/null
-# ADML actions
-
-## send_xml_to_entity
-
-Sends a diameter message in xml format (see DTDs/message.dtd) as client to the server(s) configured.
-
-Arguments: xml[, answers_to]
-* xml: the diameter message in xml format.
-* answers_to: optional step number of a 'wait_xml_from_entity' for a request message.
- Steps are the actions numbered from 1 to N
-Example(1):
-```
-- action: AF/send_xml_to_entity
- xml: aar-initial.xml
-```
-
-Example(2):
-```
-- action: AF/wait_xml_from_entity
- arguments:
- xml: dpr.xml
-
-- action: AF/send_xml_to_entity
- arguments:
- xml: dpa.xml
- answers_to: 1
-```
-
-## wait_xml_from_entity
-
-Waits a diameter message in xml format (see DTDs/message.dtd) as client from the server(s) connected.
-Step blocks until match reception (regular expressions could be used).
-
-Arguments: xml
-* xml: the diameter message in xml format.
-
-Example:
-```
-- action: AFPC/wait_xml_from_entity
- arguments:
- xml: aaa.xml
-```
-
-## send_xml_to_client
-
-Sends a diameter message in xml format (see DTDs/message.dtd) as server to any client(s) connected.
-
-Arguments: xml[, answers_to]
-* xml: the diameter message in xml format.
-* answers_to: optional step number of a 'wait_xml_from_client' for a request message.
- Steps are the actions numbered from 1 to N
-Example(1):
-```
-- action: AF/send_xml_to_client
- arguments:
- xml: dpr.xml
-```
-
-Example(2):
-```
-- action: AFPC/wait_xml_from_client
- xml: dpr.xml
- arguments:
-
-- action: AFPC/send_xml_to_client
- xml: dpa.xml
- arguments:
-```
-
-## wait_xml_from_client
-
-Waits a diameter message in xml format (see DTDs/message.dtd) as server from the client(s) connected.
-Step blocks until match reception (regular expressions could be used).
-
-Arguments: xml
-* xml: the diameter message in xml format.
-
-Example:
-```
-- action: AFPC/wait_xml_from_client
- arguments:
- xml: dpr.xml
-```
-
+++ /dev/null
-# ADML hints
-
-## AF-Application-Identifier
-
-Diameter RFC assigned the format 'OctetString' to this AVP although it is almost always intended to be human-readable. 'UTF8String' format could be more appropiate, but probably the intention was to avoid possible limits.
-
-ADML message codec shows readable data when possible using the field 'data'. When this is not possible, the 'hex-data' field will encode the information. The 'OctetString' format is hexadecimal by nature (string of octets), then always 'hex-data' will be shown for this kind of AVPs.
-
-For example:
-<avp name="AF-Application-Identifier" hex-data="75726e25334175726e2d787878253341336770702d736572766963652e696d732e696373692e6d6d74656c"/>
-
-You could decode using hex dump utility: 'xxd'
-
-$> echo "75726e25334175726e2d787878253341336770702d736572766963652e696d732e696373692e6d6d74656c" | xxd -p -r
-$> urn%3Aurn-xxx%3A3gpp-service.ims.icsi.mmtel
-
-But the thing that you may probably need, is to encode a desired value into xml messages while designing a test case. For this situation, use the opossite (drop reverse flag '-r' to xxd):
-
-$> echo -n "urn%3Aurn-xxx%3A3gpp-service.ims.icsi.mmtel" | xxd -p | tr -d '\n'
-$> 75726e25334175726e2d787878253341336770702d736572766963652e696d732e696373692e6d6d74656c
-
-or use 'od' (files dump) utility:
-
-$> echo -n "urn%3Aurn-xxx%3A3gpp-service.ims.icsi.mmtel" | od -A n -t x1 | tr -d ' ' | tr -d '\n'
-$> 75726e25334175726e2d787878253341336770702d736572766963652e696d732e696373692e6d6d74656c
-
-The '-n' in the echo is neccessary to avoid encoding of carriage return (0x0a) for the string provided.
-
+++ /dev/null
-# ADML will start with base protocol dictionary and no nodes on services.xml:
---services services.xml
-
-# Counters directory:
---cntDir counters
-# Counters record procedure period in milliseconds.
-# If missing, default value of 300000 (5 minutes) will be assigned.
-# Zero value, disable the dump procedure.
-#--cntRecordPeriod 10000
-
-# System test:
---tmDir test-reports
-# To override traffic logs configuration in order to be disabled for all the
-# loaded nodes, launch the process by mean: './start.sh st'
-
-# Statistics:
---logStatisticSamples all
-
-# Add to take debug traces once started
---trace debug
-
+++ /dev/null
-# ADML will start with base protocol dictionary and no nodes on services.xml:
---services services.xml
-
-# Counters directory:
---cntDir counters
-# Counters record procedure period in milliseconds.
-# If missing, default value of 300000 (5 minutes) will be assigned.
-# Zero value, disable the dump procedure.
-#--cntRecordPeriod 10000
-
-# System test:
---tmDir test-reports
-# To override traffic logs configuration in order to be disabled for all the
-# loaded nodes, launch the process by mean: './start.sh st'
-
-# Statistics:
---logStatisticSamples all
-
-# Add to take debug traces once started
-# --trace debug
---disableLogs
-
+++ /dev/null
-<services>
- <!--
- Stacks
-
- * Monostack: you could select any id value, normally 0.
- * Multistack: use the application id for the id value.
- This eases codec engine selection for
- processed messages.
- -->
- <stack id="0" dictionary="dictionary.xml" fixMode="Never"/>
-
- <!--
- Nodes
-
- * Client example:
-
- <node originHost="<origin host>" applicationId="<application id>"
- entity="<addr1:port1[,addr2:port2]...[,addrN:portN]>"
- cer="<cer xml file>" answersTimeout="300000" dumpLog="yes"/>
-
- * Server example:
-
- <node originHost="<origin host>" applicationId="<application id>"
- diameterServer="<addr:port>" diameterServerSessions="10"
- cea="<cea xml file>" answersTimeout="300000" dumpLog="yes"/>
- -->
- <node originHost="afHost.afRealm.com" applicationId="0" entity="localhost:3868"/>
-
-</services>
+++ /dev/null
-../../resources/stack_examples
\ No newline at end of file
+++ /dev/null
-#!/bin/bash
-# $1: args type could be 'ft' (function test) or 'st' (system test). By default: ft
-function pgrep_live {
- pids=$(pgrep "$1");
- [ "$pids" ] || return;
- ps -o s= -o pid= $pids | sed -n 's/^[^ZT][[:space:]]\+//p';
-}
-cd `dirname $0`
-ARGS=args.$1
-[ -z "$1" ] && ARGS=args.ft
-STARTED=`pgrep_live ADML`
-[ -n "$STARTED" ] && { echo "Already started !"; echo "PID $STARTED" ; exit 1 ; }
-0> launcher.trace
-for file in `ls *.launcher.log 2>/dev/null`; do 0> $file; done
-mkdir -p counters test-reports
-rm -f counters/* test-reports/* *.csv
-export LD_LIBRARY_PATH=$PWD/dynlibs
-eval ./ADML `grep -v ^# $ARGS` &
-echo $! > .pid
-echo "Done !"
-
+++ /dev/null
-#!/bin/bash
-function pgrep_live {
- pids=$(pgrep "$1");
- [ "$pids" ] || return;
- ps -o s= -o pid= $pids | sed -n 's/^[^ZT][[:space:]]\+//p';
-}
-cd `dirname $0`
-PID=$(pgrep_live ^ADML)
-[ -z "$PID" ] && exit 0
-kill $PID
-
-# Protection to force kill (with SIGKILL) if ADML still alive after certain time:
-seconds2force=3
-count=$((10*seconds2force))
-kill0=0
-while [ $kill0 -eq 0 -a $count -gt 0 ]
-do
- sleep 0.1
- count=$((count-1))
- kill -0 $PID 2>/dev/null
- kill0=$?
- echo -n .
-done
-[ $kill0 -eq 0 ] && { echo " sigkill to ADML pid $PID !" ; kill -9 $PID ; }
-rm -f .pid
-
-../../aots-adml
\ No newline at end of file
+../../adml
\ No newline at end of file