385
|
1 #!/bin/bash
|
|
2 if [ $# -ne 2 ]; then
|
|
3 echo "Usage: ./aquarium.sh NODENUM CHILDLENNUM"
|
|
4 exit 1
|
|
5 fi
|
|
6 max=$1
|
|
7 child_num=$2
|
|
8 jar_path=../build/libs/Alice.jar
|
|
9 if [ ! -e $java ]; then
|
|
10 echo "$java not found."
|
|
11 exit 1
|
|
12 fi
|
|
13
|
|
14 ruby ./topology/treen.rb $1 $2 > ./topology/tree.dot
|
|
15 dot -Tpng ./topology/tree.dot > ./topology/tree.png
|
|
16 #open ./topology/tree.png
|
|
17 java -version
|
|
18 java -cp $jar_path alice.topology.manager.TopologyManager -p 10000 -conf ./topology/tree.dot -log ./output/manager.log -level fatal > ./output/std_manager.log &
|
|
19
|
|
20 cnt=0
|
|
21 while [ $cnt -lt $max ]
|
|
22 do
|
|
23 java -cp $jar_path alice.test.topology.aquarium.fx.StartAquariumFX -host `hostname` -port 10000 -p `expr 20000 + $cnt` -log ./output/aquariumfx${cnt}.log -level fatal > ./output/std_aquariumfx${cnt}.log &
|
|
24 cnt=`expr $cnt + 1`
|
|
25 done
|
|
26 wait
|