summaryrefslogtreecommitdiff
path: root/apps/JAWS/clients/WebSTONE/bin/runbench
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-10 19:59:37 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-10 19:59:37 +0000
commit3166a386eba1d9269352ba28d0d3dd5427bce57c (patch)
treeb5ae7ca44662cfd8e5c95f1826e4406021a606f5 /apps/JAWS/clients/WebSTONE/bin/runbench
parent60a5612b83d856fc0adc52b9f39fac9960ec9818 (diff)
downloadATCD-3166a386eba1d9269352ba28d0d3dd5427bce57c.tar.gz
This commit was manufactured by cvs2svn to create branch 'subset'.
Diffstat (limited to 'apps/JAWS/clients/WebSTONE/bin/runbench')
-rwxr-xr-xapps/JAWS/clients/WebSTONE/bin/runbench193
1 files changed, 0 insertions, 193 deletions
diff --git a/apps/JAWS/clients/WebSTONE/bin/runbench b/apps/JAWS/clients/WebSTONE/bin/runbench
deleted file mode 100755
index 409351f8f55..00000000000
--- a/apps/JAWS/clients/WebSTONE/bin/runbench
+++ /dev/null
@@ -1,193 +0,0 @@
-#!/bin/sh
-# $Header$
-# set -x
-set +x
-[ -n "$WEBSTONEROOT" ] || WEBSTONEROOT=`pwd`/../
-
-case $# in
- 1)
- FILELIST=$1
- ;;
- *)
- FILELIST=$WEBSTONEROOT/conf/filelist
- ;;
-esac
-
-# load configurations
-. $WEBSTONEROOT/conf/testbed
-
-[ -n "$DEBUG" ] && set +x
-
-# check variables
-[ -n "$ITERATIONS" ] || ITERATIONS="1"
-[ -n "$MINCLIENTS" ] || MINCLIENTS="1"
-[ -n "$MAXCLIENTS" ] || MAXCLIENTS="1"
-[ -n "$CLIENTINCR" ] || CLIENTINCR="1"
-[ -n "$TIMEPERRUN" ] || TIMEPERRUN="1"
-# don't care about PROXYSERVER
-[ -n "$SERVER" ] || SERVER="www"
-[ -n "$PORTNO" ] || PORTNO="80"
-# [ -n "$SERVERINFO" ] || SERVERINFO="uname -a"
-# OSTUNINGFILES
-# WEBSERVERDIR
-# WEBDOCDIR
-# WEBSERVERTUNINGFILES
-[ -n "$CLIENTS" ] || CLIENTS="localhost"
-[ -n "$CLIENTACCOUNT" ] || CLIENTACCOUNT=$USER
-[ -n "$CLIENTPASSWORD" ] || CLIENTPASSWORD=$CLIENTACCOUNT
-# [ -n "$CLIENTINFO" ] || CLIENTINFO="uname -a"
-[ -n "$TMPDIR" ] || TMPDIR="/tmp"
-[ -n "$RCP" ] || RCP="rcp"
-[ -n "$RSH" ] || RSH="rsh"
-
-export ITERATIONS MINCLIENTS MAXCLIENTS CLIENTINCR TIMEPERRUN
-export SERVER PORTNO SERVERINFO
-export CLIENTS CLIENTACCOUNT CLIENTPASSWORD CLIENTINFO
-export TMPDIR RCP RSH
-
-echo "Clients: " $CLIENTS
-
-#
-# Estimate run time
-#
-NUMCLIENTHOSTS=`echo $CLIENTS | wc -w`
-TRIALS=`expr 1 + \( $MAXCLIENTS - $MINCLIENTS \) / $CLIENTINCR`
-RUNTIME=`expr 60 \* $ITERATIONS \* $TRIALS \* $TIMEPERRUN`
-RUNTIME=`expr $RUNTIME + $TRIALS \* \( $MAXCLIENTS + $MINCLIENTS \) \
- / \( 2 \* $NUMCLIENTHOSTS \)`
-
-echo "Estimated run time:" `expr $RUNTIME / 3600` "hours" \
- `expr $RUNTIME % 3600 / 60` "minutes"
-
-#
-# Checking for valid set of benchmark files to retrieve
-#
-#if [ -z "$PROXYSERVER" ]
-#then
-# echo "Checking for a valid set of benchmark files"
-# CHECKLISTTMP=$TMPDIR/webstone-checkfilelist.$$
-# rm -f $CHECKFILELISTTMP
-# $WEBSTONEROOT/bin/checkfilelist $SERVER $PORTNO $FILELIST > $CHECKLISTTMP 2>&1
-# if [ `grep -c ' 4[0-9][0-9] '< $CHECKLISTTMP` -gt 0 ]
-# then
-# echo "ERROR: not all files in filelist are on server:"
-# echo "----- checkfilelist results -----"
-# cat $CHECKLISTTMP
-# echo "----- checkfilelist results -----"
-# rm -f $CHECKLISTTMP
-# exit 1
-# else
-# echo "OK: All files found"
-# fi
-# rm -f $CHECKLISTTMP
-#fi
-# end if $PROXYSERVER
-
-#
-# distribute webclient binary
-#
-for i in $CLIENTS
-do
- $RCP $WEBSTONEROOT/bin/webclient $i:$TMPDIR #/usr/local/bin
-done
-
-# BEGIN iterations
-J=1
-while [ $J -le $ITERATIONS ]
-do
- NUMCLIENTS=$MINCLIENTS
- while [ $NUMCLIENTS -le $MAXCLIENTS ]
- do
- echo "***** Iteration $J, Total clients "`expr $NUMCLIENTS`" **********"
- date
- TIMESTAMP=`date +"%y%m%d_%H%M"`
- LOGDIR=$WEBSTONEROOT/bin/runs/$TIMESTAMP
-
- #
- # nuke debug files
- #
- for client in $CLIENTS
- do
- $RSH $client "rm /tmp/webstone-debug*" > /dev/null 2>&1
- done
-
- mkdir -p $LOGDIR
- rm -f $LOGDIR/config
- touch $LOGDIR/config
- CLIENTSPERHOST=`expr $NUMCLIENTS / $NUMCLIENTHOSTS`
- EXTRACLIENTS=`expr $NUMCLIENTS % $NUMCLIENTHOSTS`
-
- for i in $CLIENTS
- do
- if [ $EXTRACLIENTS -gt 0 ]
- then
- echo "$i $CLIENTACCOUNT $CLIENTPASSWORD `expr $CLIENTSPERHOST + 1`" \
- >> $LOGDIR/config
- EXTRACLIENTS=`expr $EXTRACLIENTS - 1`
- else
- echo "$i $CLIENTACCOUNT $CLIENTPASSWORD $CLIENTSPERHOST" \
- >> $LOGDIR/config
- fi
- done
- cp $FILELIST $LOGDIR/`basename $FILELIST`
-
- #
- # Put test configuration files on clients
- #
- for i in $CLIENTS localhost
- do
- $RSH $i "rm -f $TMPDIR/config $TMPDIR/`basename $FILELIST`"
- $RCP $LOGDIR/config $i:$TMPDIR/config
- $RCP $LOGDIR/`basename $FILELIST` $i:$TMPDIR/filelist
- done
-
- #
- # Get starting configuration and stats from each participant
- #
- $RSH $SERVER "$SERVERINFO" > $LOGDIR/hardware.$SERVER 2>&1
- for i in $CLIENTS
- do
- $RSH $i "$CLIENTINFO" > $LOGDIR/hardware.$i 2>&1
- done
-
- # set -x
- for i in $OSTUNINGFILES $WEBSERVERTUNINGFILES
- do
- $RCP $SERVER:$i $LOGDIR
- done
- set +x
-
- #
- # Run benchmark
- #
- date
- CMD="$WEBSTONEROOT/bin/webmaster -v -u $TMPDIR/filelist"
- CMD=$CMD" -f $TMPDIR/config -l $TIMEPERRUN"
- [ -n "$SERVER" ] && CMD=$CMD" -w $SERVER"
- [ -n "$PORTNO" ] && CMD=$CMD" -p $PORTNO"
- [ -n "$PROXYSERVER" ] && CMD=$CMD" -P $PROXYSERVER"
- [ -n "$DEBUG" ] && CMD=$CMD" -d"
- echo $CMD
-
- # dump environment into $LOGDIR
- rm -rf $LOGDIR/controller.env
- env > $LOGDIR/controller.env
-
- $CMD | tee $LOGDIR/run
-
- #
- # Get ending configuration and stats from each participant
- #
- date
- #for i in $SERVER $CLIENTS
- #do
- #$WEBSTONEROOT/bin/getstats $i > $LOGDIR/end.$i 2>&1
- #done
- #date
- NUMCLIENTS=`expr $NUMCLIENTS + $CLIENTINCR`
- done
- # while NUMCLIENTS
- J=`expr $J + 1`
-done
-# while J
-# end