Mercurial > hg > Members > nobuyasu > jungle_benchmark
view distributed/weighttp/stress_weighttp.sh @ 20:61221984aa56
stress_weighttp.sh
author | Nobuyasu |
---|---|
date | Wed, 29 Jan 2014 16:00:44 +0900 |
parents | c28f8d47c60d |
children | a972a5814b0b |
line wrap: on
line source
#!/bin/sh export LD_LIBRARY_PATH=/usr/local/lib hostname=`hostname` clientsFile=$1 nodesFile=$2 schedule=$3 requestNum=$4 concurrent=$5 threadNum=$6 function get_node_name() { num=$1 nodeLength=0 nodeArray=() while read serv do nodeArray[$nodeLength]=$serv nodeLength=`expr $nodeLength + 1` done echo ${nodeArray[$num]} } function get_my_num() { num=0 myName=$1 while read serv do if [ $serv = $myName ]; then break fi num=`expr $num + 1` done echo $num } #cat $clientsFile num=0 myName=$1 while read serv do echo "while" if [ $serv = $myName ]; then break fi num=`expr $num + 1` done echo $num