mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-23 00:00:01 +01:00
git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@275 8ec27952-4edc-4aab-86aa-e87bb2611832
72 lines
No EOL
1.6 KiB
Bash
Executable file
72 lines
No EOL
1.6 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Configuration
|
|
|
|
HOST=$(hostname -s)
|
|
|
|
#LOCAL_IP=10.10.12.2
|
|
LOCAL_IP=127.0.0.1
|
|
LOCAL_PORT=12001
|
|
|
|
#REMOTE_IP=10.10.12.3
|
|
REMOTE_IP=127.0.0.1
|
|
REMOTE_PORT=12002
|
|
|
|
#LOCAL_DIR=/s2ss/server/
|
|
#REMOTE_DIR=/s2ss/server/
|
|
LOCAL_DIR=/home/stv0g/workspace/rwth/acs/s2ss/server
|
|
REMOTE_DIR=$LOCAL_DIR
|
|
######################### End of Configuration ################################
|
|
# There's no need to change something below this line
|
|
|
|
SSH="ssh -T $REMOTE_IP"
|
|
|
|
TEST_CONFIG="
|
|
affinity = 0x02; # Mask of cores the server should run on
|
|
priority = 50; # Scheduler priority for the server
|
|
debug = 10; # The level of verbosity for debug messages
|
|
stats = 3; # The interval in seconds fo path statistics
|
|
|
|
nodes = {
|
|
remote = {
|
|
type = \"udp\";
|
|
local = \"$LOCAL_IP:$LOCAL_PORT\";
|
|
remote = \"$REMOTE_IP:$REMOTE_PORT\";
|
|
}
|
|
};
|
|
"
|
|
|
|
|
|
REMOTE_CONFIG="
|
|
affinity = 0x02; # Mask of cores the server should run on
|
|
priority = 50; # Scheduler priority for the server
|
|
debug = 0; # The level of verbosity for debug messages
|
|
stats = 0; # The interval in seconds fo path statistics
|
|
|
|
nodes = {
|
|
remote = {
|
|
type = \"udp\";
|
|
local = \"$REMOTE_IP:$REMOTE_PORT\";
|
|
remote = \"$LOCAL_IP:$LOCAL_PORT\";
|
|
},
|
|
};
|
|
|
|
paths = ({
|
|
in = \"remote\";
|
|
out = \"remote\";
|
|
});
|
|
"
|
|
|
|
# Start remote server
|
|
$SSH -n "echo '$REMOTE_CONFIG' | sudo $REMOTE_DIR/server -" &
|
|
REMOTE_PID=$!
|
|
echo "Started remote server with pid: $REMOTE_PID"
|
|
|
|
# Start tests
|
|
echo "$TEST_CONFIG" | $LOCAL_DIR/test - rtt -f 3 -c 100000 3>> test_output
|
|
|
|
# Stop remote server
|
|
$SSH sudo kill $REMOTE_PID
|
|
echo "Stopped remote server with pid: $REMOTE_PID" |