Mercurial > hg > Members > tatsuki > Alice
comparison scripts/aquarium.sh @ 180:481dab56c3dc working
aquarium can execute on mountain lion (with java 1.6)
author | e095732 |
---|---|
date | Thu, 07 Feb 2013 20:07:39 +0900 |
parents | 23d6a775a643 |
children | 52dcead81b90 |
comparison
equal
deleted
inserted
replaced
179:8d3cb7e5fa57 | 180:481dab56c3dc |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 # java="java -version:1.6" | |
3 java="java" | |
4 # export JAVA_HOME="/System/Library/Java/JavaVirtualMachines/1.6.jdk/Contents/Home" | |
5 max=$1 | 2 max=$1 |
6 child_num=$2 | 3 child_num=$2 |
7 echo 1 | 4 java=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java |
8 ruby ./topology/treen.rb $1 $2 > ./topology/tree.dot | 5 ruby ./topology/treen.rb $1 $2 > ./topology/tree.dot |
9 echo 2 | |
10 dot -Tpng ./topology/tree.dot > ./topology/tree.png | 6 dot -Tpng ./topology/tree.dot > ./topology/tree.png |
11 #open ./topology/tree.png | 7 #open ./topology/tree.png |
12 echo 3 | 8 $java -version |
13 $java -cp ../Alice.jar alice.topology.manager.TopologyManager -p 10000 -conf ./topology/tree.dot -log ./output/manager.log -level debug > ./output/std_manager.log & | 9 $java -cp ../Alice.jar alice.topology.manager.TopologyManager -p 10000 -conf ./topology/tree.dot -log ./output/manager.log -level debug > ./output/std_manager.log & |
14 sleep 3 | |
15 | 10 |
16 cnt=0 | 11 cnt=0 |
17 #max=`expr $max - 1` | |
18 while [ $cnt -lt $max ] | 12 while [ $cnt -lt $max ] |
19 do | 13 do |
20 echo 4 $cnt | 14 $java -cp ../Alice.jar alice.test.topology.aquarium.FishMovementTopology -host `hostname` -port 10000 -p `expr 20000 + $cnt` -log ./output/aquarium${cnt}.log -level debug > ./output/std_aquarium${cnt}.log & |
21 $java -cp ../Alice.jar alice.test.topology.aquarium.FishMovementTopology -host 192.168.128.41 -port 10000 -p `expr 20000 + $cnt` -log ./output/aquarium${cnt}.log -level debug > ./output/std_aquarium${cnt}.log & | |
22 cnt=`expr $cnt + 1` | 15 cnt=`expr $cnt + 1` |
23 sleep 3 | |
24 done | 16 done |
25 wait | 17 wait |