Commit 5fda5134 authored by Joanne Hugé's avatar Joanne Hugé

Cleanup and improve run_client script

parent b01a7fef
......@@ -3,24 +3,34 @@
script_dir=$(dirname $(realpath $0))
usage() {
echo "Usage: $0 -e delta|-p [-i INTERVAL]" 1>&2;
echo "Usage: $0 -e delta|-p [-i INTERVAL] [-t]" 1>&2;
exit 1;
}
# Default interval
interval=100000
while getopts "e:i:p" opt; do
# Default options
client_options="-a -p 99 -f eth0"
qdisc_options=""
while getopts "e:i:pt" opt; do
case "${opt}" in
e )
delta=${OPTARG}
use_etf=1
client_options+=" -e -q 7"
qdisc_options+="-e ${OPTARG}"
;;
i )
interval=${OPTARG}
;;
p )
use_pfast=1
client_options+=" -q 1"
qdisc_options+="-p"
;;
t )
client_options+=" -t"
;;
* )
usage
......@@ -36,14 +46,8 @@ if [ -n "${use_etf}" ] && [ -n "${use_pfast}" ]; then
usage
fi
if [ -n "${use_etf}" ]; then
echo "$script_dir/create_qdisc -e $delta";
$script_dir/create_qdisc -e $delta;
echo "$script_dir/../packet-exchange/build/client_arm -ae -p 99 -q 7 -f eth0 -i $interval 192.168.99.25";
$script_dir/../packet-exchange/build/client_arm -ae -p 99 -q 7 -f eth0 -i $interval 192.168.99.25;
elif [ -n "${use_pfast}" ]; then
echo "$script_dir/create_qdisc -p";
$script_dir/create_qdisc -p;
echo "$script_dir/../packet-exchange/build/client_arm -a -p 99 -q 1 -f eth0 -i $interval 192.168.99.25";
$script_dir/../packet-exchange/build/client_arm -a -p 99 -q 1 -f eth0 -i $interval 192.168.99.25;
fi
echo "$script_dir/create_qdisc $qdisc_options";
$script_dir/create_qdisc $qdisc_options;
echo "$script_dir/../packet-exchange/build/client_arm $client_options -i $interval 192.168.99.25";
$script_dir/../packet-exchange/build/client_arm $client_options -i $interval 192.168.99.25;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment