#!/bin/sh . aux.sh i=0 while [ ${i} -le 16 ] ; do id=`mkid ${i}` img=${TESTHOME}/img${id} # use single backend file so that the OS can (hopefully) cache it #img=${TESTHOME}/img exports=${TESTHOME}/gg.exports.${id} ggated_port=308${id} # create backend image, 32MiB #dd if=/dev/urandom of=${img} bs=1m count=32 # create ggated config file echo "127.0.0.1 RW ${img}" > ${exports} # start ggated ggated -p ${ggated_port} -a 127.0.0.1 ${exports} # give time to ggated to start sleep 0.5 # start ggatec ggatec create -p ${ggated_port} -u 1${id} 127.0.0.1 ${img} # limit bandwidth to approximately 1MiB/sec ipfw pipe 1${id} config bw 17MBit/s ipfw add 1${id} pipe 1${id} tcp from 127.0.0.1 ${ggated_port} to any i=$((${i} + 1)) done # EOF