Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / rxkad / test / stress_test_mp
1 #! /bin/csh -fe
2 # Copyright 2000, International Business Machines Corporation and others.
3 # All Rights Reserved.
4 #
5 # This software has been released under the terms of the IBM Public
6 # License. For details, see the LICENSE file in the top-level source
7 # directory or online at http://www.openafs.org/dl/license10.html
8
9 # This script runs the Rx stress test on a list of machines. It needs
10 # to be started on all the machines within a few seconds of each other
11 # and it will run indefinitely.
12
13 set load = 1
14 if ("$1" == "-noload") then
15 echo Skipping load test.
16 set load = 0
17 endif
18
19 if (! $?RX_STRESS_SERVERS ) then
20 setenv RX_STRESS_SERVERS "sybil bigtime brick junior"
21 endif
22 set servers = ( $RX_STRESS_SERVERS )
23
24 if (! $?RX_STRESS_DIR ) setenv RX_STRESS_DIR ~/afs/3.3/obj/rxkad/test
25 cd $RX_STRESS_DIR
26
27 # ./stress -client localhost -stopserver # kill existing server if any
28 ./stress -server &
29 sleep 10
30 set i = 1
31 set interval = 900
32 while ($i <= $#servers)
33 ./stress -client $servers[$i] -hijacktest -calltest
34 if (load == 1) then
35 echo Starting load test on server $servers[$i]
36 alias stm ./stress -client $servers[$i] \
37 -fastcalls 1000 -slowcalls 60 \
38 -copiouscalls 10 -sendlen 100000 -recvlen 100000 \
39 -repeatinterval $interval
40 stm -auth clear &
41 stm -auth auth &
42 stm -auth crypt &
43 endif
44 @ i ++
45 @ interval += 100
46 end