agent="Siege 1.0"
rcconfig="/opt/siege4.0/etc/siegerc"
concurrent=$1
repet=$2
url="/opt/siege4.0/etc/$3"

for runTime in `seq 1 $repet`
do
if(($4==1))
then
`nohup /opt/siege4.0/bin/siege -c $concurrent -r $repet -i -b -f $url -R $rcconfig -A "$agent" >/dev/null &`
echo $runTime
else
/opt/siege4.0/bin/siege -c $concurrent -r $repet -i -b -f $url -R $rcconfig -A "$agent" &
echo $runTime
fi
done

 

vconfig="/opt/siege4.0/etc/siegerc"
vtoken=""
vtype="content-type:application/x-www-form-urlencoded;charset=utf-8"
vagent=""
vrequestUrls=$1
vprocessNumbers=$2
vconcurrentNumbers=$1
vrunTimes=$3
vflag=$4

for pn in `seq 1 $vprocessNumbers`
do
if(($vflag==1))
then
`nohup /opt/siege4/bin/siege -c $vconcurrentNumbers -t $vrunTimes -b -H $vtoken -T $vtype -A $vagent -f $vrequestUrls -R $vconfig >/dev/null &`
#echo $runTime
else
/opt/siege4/bin/siege -c $vconcurrentNumbers -t $vrunTimes -b -H $vtoken -T $vtype -A $vagent -f $vrequestUrls -R $vconfig &
#echo $runTime
fi
done

posted on 2018-03-14 15:06  新美好时代  阅读(194)  评论(0编辑  收藏  举报