added
authorJan Pospíšil <honik@ntc.zcu.cz>
Fri, 23 Jun 2006 07:12:04 +0000 (07:12 +0000)
committerJan Pospíšil <honik@ntc.zcu.cz>
Fri, 23 Jun 2006 07:12:04 +0000 (07:12 +0000)
org.glite.lb.client/src/perftest_query.sh [new file with mode: 0644]

diff --git a/org.glite.lb.client/src/perftest_query.sh b/org.glite.lb.client/src/perftest_query.sh
new file mode 100644 (file)
index 0000000..52b7cdd
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+clients=${1:-3}
+
+jobs=${2:-/tmp/perftest_10.jobids}
+
+# XXX - there must be better way to find stage
+if [ -z "${GLITE_LOCATION}" ]; then
+        STAGEDIR=/home/michal/shared/egee/jra1-head/stage
+else
+        STAGEDIR=${GLITE_LOCATION}
+fi
+JOBSTAT:=$STAGEDIR/examples/glite-lb-job_status
+
+ask() {
+       $JOBSTAT `cat $jpbs`
+}
+
+do_ask() {
+        while (true)
+        do
+                ask
+                sleep `expr 5 \* $RANDOM / 32767`
+        done
+}
+
+for i in `seq 1 $clients`
+do
+       do_ask &
+done
+