Twister startup script using older shells

5 views
Skip to first unread message

ffoe...@gmail.com

unread,
Jul 28, 2010, 6:19:10 PM7/28/10
to vscse-big-data-...@googlegroups.com
I was trying to use my own mini cluster running 10.04 (Lucid)

You'll have to modify the start_twister.sh script because the for loop is a bit too modern for the shell in there... below is something more compatible with any older shell.
You can see where I commented out the for loop.

---------------------------

numDaemons=1
numWorkers=1

numDaemons=`sed '/^\#/d' twister.properties | grep 'daemons_per_node' | tail -n 1 | sed 's/^.*=//;s/^[[:space:]]*//;s/[[:space:]]*$//'`
numWorkers=`sed '/^\#/d' twister.properties | grep 'workers_per_daemon' | tail -n 1 | sed 's/^.*=//;s/^[[:space:]]*//;s/[[:space:]]*$//'`

#Starting the Twister daemons.
count=0
i=0
for line in `cat $TWISTER_HOME/bin/nodes`;do
echo $line
## for ((i=0; i<{$numDaemons}; i++))
## do
while [ $i != $numDaemons ]; do
i=`expr $count + 1`

echo $i $line
ssh $line $TWISTER_HOME/bin/stimr.sh $count $numWorkers &
count=`expr $count + 1`
sleep 1
done
done

Saliya Ekanayake

unread,
Jul 28, 2010, 7:02:40 PM7/28/10
to vscse-big-data-...@googlegroups.com
Thank you for sharing this info.

Saliya
Reply all
Reply to author
Forward
0 new messages