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

Improve packet-histogram scripts

Add prints on _packet-histogram-stop
Allow packet-histogram to start multiple tests
parent b1f2788a
......@@ -83,13 +83,17 @@ fi
if [ -n "$client_histogram" ]; then
ssh -t $client_board "echo olimex | sudo -S killall client";
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";
echo "Killing server ($server_board)...";
ssh -t $server_board "echo olimex | sudo -S killall server";
echo "Copying $output...";
scp $client_board:$output $script_dir/;
cd $script_dir/../measure-analysis;
echo "Writing metadata...";
cat > client_metadata << EndOfMessage
{"ker": "$kernel_version"}
EndOfMessage
......@@ -101,13 +105,17 @@ EndOfMessage
elif [ -n "$server_histogram" ]; then
echo "Killing server ($server_board)...";
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";
echo "Copying $output";
scp $server_board:$output $script_dir/;
cd $script_dir/../measure-analysis;
echo "Writing metadata...";
if [ -n "$server_etf" ]; then
cat > server_metadata << EndOfMessage
......@@ -136,6 +144,7 @@ EndOfMessage
elif [ -n "$cyclictest_histogram" ]; then
echo "Killing cyclictest on $board...";
ssh -t $board "echo olimex | sudo -S killall cyclictest";
if [ -n "$stop_load" ]; then
......@@ -147,6 +156,7 @@ elif [ -n "$cyclictest_histogram" ]; then
cd $script_dir/../measure-analysis;
echo "Writing metadata...";
if [ -n "$stop_load" ]; then
cat > cyclictest_metadata << EndOfMessage
......
......@@ -81,13 +81,22 @@ else
usage
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
if [ -n "$client_histogram" ]; then
$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";
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
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 $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
elif [ -n "$server_etf" ]; 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 $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
echo "Server histogram requires choosing between pfifo_fast or etf qdisc";
......@@ -116,6 +125,6 @@ elif [ -n "$cyclictest_histogram" ]; then
$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
#!/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/_packet-histogram-stop `cat packet-histogram-stop_options`;
rm packet-histogram-stop_options
stop_opt_name=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