Commit 02ddb222 authored by Joanne Hugé's avatar Joanne Hugé

Merge branch 'packet-exchange' into dev

parents 9003b536 5adc762c
...@@ -83,13 +83,17 @@ fi ...@@ -83,13 +83,17 @@ fi
if [ -n "$client_histogram" ]; then if [ -n "$client_histogram" ]; then
ssh -t $client_board "echo olimex | sudo -S killall client"; echo "Killing client ($client_board)...";
ssh -t $server_board "echo olimex | sudo -S killall server"; ssh -t $client_board "echo olimex | sudo -S killall client";
echo "Killing server ($server_board)...";
ssh -t $server_board "echo olimex | sudo -S killall server";
echo "Copying $output...";
scp $client_board:$output $script_dir/; scp $client_board:$output $script_dir/;
cd $script_dir/../measure-analysis; cd $script_dir/../measure-analysis;
echo "Writing metadata...";
cat > client_metadata << EndOfMessage cat > client_metadata << EndOfMessage
{"ker": "$kernel_version"} {"ker": "$kernel_version"}
EndOfMessage EndOfMessage
...@@ -101,13 +105,17 @@ EndOfMessage ...@@ -101,13 +105,17 @@ EndOfMessage
elif [ -n "$server_histogram" ]; then elif [ -n "$server_histogram" ]; then
echo "Killing server ($server_board)...";
ssh -t $server_board "echo olimex | sudo -S killall server"; ssh -t $server_board "echo olimex | sudo -S killall server";
echo "Killing client ($client_board)...";
ssh -t $client_board "echo olimex | sudo -S killall client"; ssh -t $client_board "echo olimex | sudo -S killall client";
echo "Copying $output";
scp $server_board:$output $script_dir/; scp $server_board:$output $script_dir/;
cd $script_dir/../measure-analysis; cd $script_dir/../measure-analysis;
echo "Writing metadata...";
if [ -n "$server_etf" ]; then if [ -n "$server_etf" ]; then
cat > server_metadata << EndOfMessage cat > server_metadata << EndOfMessage
...@@ -136,6 +144,7 @@ EndOfMessage ...@@ -136,6 +144,7 @@ EndOfMessage
elif [ -n "$cyclictest_histogram" ]; then elif [ -n "$cyclictest_histogram" ]; then
echo "Killing cyclictest on $board...";
ssh -t $board "echo olimex | sudo -S killall cyclictest"; ssh -t $board "echo olimex | sudo -S killall cyclictest";
if [ -n "$stop_load" ]; then if [ -n "$stop_load" ]; then
...@@ -147,6 +156,7 @@ elif [ -n "$cyclictest_histogram" ]; then ...@@ -147,6 +156,7 @@ elif [ -n "$cyclictest_histogram" ]; then
cd $script_dir/../measure-analysis; cd $script_dir/../measure-analysis;
echo "Writing metadata...";
if [ -n "$stop_load" ]; then if [ -n "$stop_load" ]; then
cat > cyclictest_metadata << EndOfMessage cat > cyclictest_metadata << EndOfMessage
......
...@@ -81,13 +81,22 @@ else ...@@ -81,13 +81,22 @@ else
usage usage
fi fi
stop_opt_name=packet-histogram_stop-options
stop_opt_index=0
while [ -f "${stop_opt_name}${stop_opt_index}" ]; do
stop_opt_index=$(( $stop_opt_index + 1 ))
done
stop_opt_filename=${stop_opt_name}${stop_opt_index}
# Client histogram # Client histogram
if [ -n "$client_histogram" ]; then if [ -n "$client_histogram" ]; then
$script_dir/exec-ssh-nohup $server_board "run-server"; $script_dir/exec-ssh-nohup $server_board "run-server";
$script_dir/exec-ssh-nohup $client_board "run-client -p -i $interval -t -g $server_board"; $script_dir/exec-ssh-nohup $client_board "run-client -p -i $interval -t -g $server_board";
echo "$stop_opts -c client_i${interval}_pfast -i $interval $client_board $server_board" > $script_dir/packet-histogram-stop_options; echo "$stop_opts -c client_i${interval}_pfast -i $interval $client_board $server_board" > $script_dir/${stop_opt_filename};
# Server histogram # Server histogram
elif [ -n "$server_histogram" ]; then elif [ -n "$server_histogram" ]; then
...@@ -97,7 +106,7 @@ elif [ -n "$server_histogram" ]; then ...@@ -97,7 +106,7 @@ elif [ -n "$server_histogram" ]; then
$script_dir/exec-ssh-nohup $server_board "run-server -g ${interval}$server_opts"; $script_dir/exec-ssh-nohup $server_board "run-server -g ${interval}$server_opts";
$script_dir/exec-ssh-nohup $client_board "run-client -p -i $interval $server_board"; $script_dir/exec-ssh-nohup $client_board "run-client -p -i $interval $server_board";
echo "$stop_opts -s server_i${interval} $server_opts -p $client_board $server_board" > $script_dir/packet-histogram-stop_options; echo "$stop_opts -s server_i${interval} $server_opts -p $client_board $server_board" > $script_dir/${stop_opt_filename};
# Server ETF qdisc histogram # Server ETF qdisc histogram
elif [ -n "$server_etf" ]; then elif [ -n "$server_etf" ]; then
...@@ -105,7 +114,7 @@ elif [ -n "$server_histogram" ]; then ...@@ -105,7 +114,7 @@ elif [ -n "$server_histogram" ]; then
$script_dir/exec-ssh-nohup $server_board "run-server -g ${interval}$server_opts"; $script_dir/exec-ssh-nohup $server_board "run-server -g ${interval}$server_opts";
$script_dir/exec-ssh-nohup $client_board "run-client -e $etf_delta -o $etf_offset -i $interval $server_board"; $script_dir/exec-ssh-nohup $client_board "run-client -e $etf_delta -o $etf_offset -i $interval $server_board";
echo "$stop_opts -s server_i${interval} $server_opts -e $etf_delta -o $etf_offset $client_board $server_board" > $script_dir/packet-histogram-stop_options; echo "$stop_opts -s server_i${interval} $server_opts -e $etf_delta -o $etf_offset $client_board $server_board" > $script_dir/${stop_opt_filename};
else else
echo "Server histogram requires choosing between pfifo_fast or etf qdisc"; echo "Server histogram requires choosing between pfifo_fast or etf qdisc";
...@@ -116,6 +125,6 @@ elif [ -n "$cyclictest_histogram" ]; then ...@@ -116,6 +125,6 @@ elif [ -n "$cyclictest_histogram" ]; then
$script_dir/exec-ssh-nohup $board "run-cyclictest -g $cyclictest_opts -i $interval"; $script_dir/exec-ssh-nohup $board "run-cyclictest -g $cyclictest_opts -i $interval";
echo "$stop_opts -C cyclictest_hist $cyclictest_opts $board" > $script_dir/packet-histogram-stop_options; echo "$stop_opts -C cyclictest_hist $cyclictest_opts $board" > $script_dir/${stop_opt_filename};
fi fi
#!/bin/bash #!/bin/bash
usage() {
echo "Usage: $0 STOP_OPTIONS_INDEX" 1>&2;
exit 1;
}
if [ -z "$1" ]; then
usage
fi
script_dir=$(dirname $(realpath $0)) script_dir=$(dirname $(realpath $0))
$script_dir/_packet-histogram-stop `cat packet-histogram-stop_options`; stop_opt_name=packet-histogram_stop-options
rm packet-histogram-stop_options stop_opt_index=$1
stop_opt_filename=${stop_opt_name}${stop_opt_index}
echo "$script_dir/_packet-histogram-stop `cat $stop_opt_filename`";
cat_out=`cat $stop_opt_filename`;
echo "cat_out = $cat_out";
$script_dir/_packet-histogram-stop `cat $stop_opt_filename`;
rm $stop_opt_filename
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