From: Dennis Schafroth Date: Sun, 14 Mar 2010 10:47:34 +0000 (+0100) Subject: Script that tries to keep a fixed number of clients X-Git-Tag: v1.4.0~67^2~7^2 X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=1b15ac45e671e7bd1d211291c5db197604beca30;p=pazpar2-moved-to-github.git Script that tries to keep a fixed number of clients --- diff --git a/perf/bash/par_fixed_clients.sh b/perf/bash/par_fixed_clients.sh new file mode 100755 index 0000000..7dc8779 --- /dev/null +++ b/perf/bash/par_fixed_clients.sh @@ -0,0 +1,23 @@ +#!/bin/bash +DELAY=0.001 +WAIT=1 +NUMBER=100 +ROUNDS=5 +let r=0 +while test $r -lt $ROUNDS; do + echo "$r" + i=0 + while test $i -lt $NUMBER; do + ./client.sh $r.$i >$r.$i.log 2>&1 & + CLIENTS=`ps -ef |grep -c client.sh` + while test $CLIENTS -ge $NUMBER ; do + sleep $WAIT + CLIENTS=`ps -ef |grep -c client.sh` + echo "Active $CLIENTS" + done + let i=$i+1 + done + let r=$r+1 +done +wait +wget -O x 'http://localhost:8010/?command=exit'