Commit efaf51fb authored by Joanne Hugé's avatar Joanne Hugé

Fix file redirection in wrapper scripts when using histograms

parent 0cb8b530
...@@ -12,7 +12,6 @@ interval=100000 ...@@ -12,7 +12,6 @@ interval=100000
# Default options # Default options
client_options="-a -p 99 -f eth0" client_options="-a -p 99 -f eth0"
redirect=""
qdisc_options="" qdisc_options=""
ip="192.168.99." ip="192.168.99."
...@@ -85,7 +84,6 @@ else ...@@ -85,7 +84,6 @@ else
else else
output+="_etf_${delta}" output+="_etf_${delta}"
fi fi
redirect+="> $output;mv $output ~/"
fi fi
client_options+=" -i $interval" client_options+=" -i $interval"
...@@ -94,7 +92,15 @@ echo "create_qdisc $qdisc_options"; ...@@ -94,7 +92,15 @@ echo "create_qdisc $qdisc_options";
$script_dir/create_qdisc $qdisc_options; $script_dir/create_qdisc $qdisc_options;
echo "make client"; echo "make client";
cd $script_dir/../packet-exchange/build;make client;cd $script_dir cd $script_dir/../packet-exchange/build;
make client;
cd $script_dir;
echo "client $client_options $ip $redirect"; if [ -z "${use_histogram}" ]; then
$script_dir/../packet-exchange/build/client $client_options $ip $redirect; echo "client $client_options $ip";
$script_dir/../packet-exchange/build/client $client_options $ip;
else
echo "client $client_options $ip > $output;mv $output ~/";
$script_dir/../packet-exchange/build/client $client_options $ip > $output;
mv $output ~/;
fi
...@@ -9,7 +9,6 @@ usage() { ...@@ -9,7 +9,6 @@ usage() {
# Default options # Default options
server_options="-a -p 99 -f eth0" server_options="-a -p 99 -f eth0"
redirect=""
ip="192.168.99." ip="192.168.99."
while getopts "b:htd:g:" opt; do while getopts "b:htd:g:" opt; do
...@@ -61,7 +60,6 @@ if [ -z "${use_histogram}" ]; then ...@@ -61,7 +60,6 @@ if [ -z "${use_histogram}" ]; then
server_options+=" -v" server_options+=" -v"
else else
output="server_i${interval}" output="server_i${interval}"
redirect+="> $output;mv $output ~/"
fi fi
if [ -n "${use_tcpdump}" ]; then if [ -n "${use_tcpdump}" ]; then
...@@ -79,6 +77,12 @@ else ...@@ -79,6 +77,12 @@ else
echo "make server"; echo "make server";
cd $script_dir/../packet-exchange/build;make server;cd $script_dir cd $script_dir/../packet-exchange/build;make server;cd $script_dir
echo "server $server_options $redirect"; if [ -z "${use_histogram}" ]; then
$script_dir/../packet-exchange/build/server $server_options $redirect; echo "server $server_options";
$script_dir/../packet-exchange/build/server $server_options;
else
echo "server $server_options > $output; mv $output ~/";
$script_dir/../packet-exchange/build/server $server_options > $output;
mv $output ~/;
fi
fi fi
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