Home | History | Annotate | Download | only in examples
      1 #set -x
      2 # edit and add to this array as necessary
      3 # the hosts you will use should be contiguous
      4 # starting at index zero
      5 remote_hosts[0]=192.168.2.3
      6 remote_hosts[1]=192.168.3.5
      7 remote_hosts[2]=192.168.4.6
      8 remote_hosts[3]=192.168.5.7
      9 remote_hosts[4]=192.168.2.5
     10 remote_hosts[5]=192.168.3.3
     11 remote_hosts[6]=192.168.4.7
     12 remote_hosts[7]=192.168.5.6
     13 remote_hosts[8]=192.168.2.6
     14 remote_hosts[9]=192.168.3.7
     15 remote_hosts[10]=192.168.4.3
     16 remote_hosts[11]=192.168.5.5
     17 remote_hosts[12]=192.168.2.7
     18 remote_hosts[13]=192.168.3.6
     19 remote_hosts[14]=192.168.4.5
     20 remote_hosts[15]=192.168.5.3
     21 
     22 # this should always be less than or equal to the
     23 # number of valid hosts in the array above
     24 num_cli=16
     25 
     26 # this will be the length of each individual test
     27 # iteration
     28 length=30
     29 
     30 # this will be the settings for confidence intervals
     31 # you can use a smaller number of iterations but
     32 # to ensure that everyone is running at the same time
     33 # the min and max iterations MUST be the same
     34 confidence="-i 30,30"
     35 
     36 # the different number of concurrent sessions to be run
     37 # if you do not start with one concurrent session the 
     38 # test headers may not be where one wants them and you
     39 # may need to edit the output to hoist the test header
     40 # up above the first result
     41 concurrent_sessions="1 4 8 16 32 64"
     42 
     43 # the socket buffer sizes - you may need to tweak
     44 # some system settings to allow 1M socket buffers
     45 socket_sizes=" -s 1M -S 1M"
     46 
     47 # the burst sizes in the aggregate request/response tests
     48 #burst_sizes="0 1 4 16 64 256 1024"
     49 burst_sizes="0 1 4 16"
     50 
     51 # this ensures the test header of at least one instance 
     52 # is displayed
     53 HDR="-P 1"
     54 
     55 # -O means "human" -o means "csv" and -k means "keyval"
     56 # "all" means emit everything it knows to emit. omit "all"
     57 # and what is emitted will depend on the test. can customize
     58 # with direct output selection or specifying a file with
     59 # output selectors in it
     60 CSV="-o all"
     61 
     62 # should tests outbound relative to this system be run?
     63 DO_STREAM=0
     64 
     65 # should tests inbound relative to this system be run?
     66 DO_MAERTS=0
     67 
     68 # should same connection bidirectional tests be run?
     69 DO_BIDIR=1
     70 
     71 # should aggreagte single-byte request/response be run?
     72 # this can be used to try to get a maximum PPS figure
     73 DO_RRAGG=1
     74 
     75 # here you should echo-out some things about the test
     76 # particularly those things that will not be automagically
     77 # captured by netperf.
     78 echo interrupts spread wherever irqbalanced put them
     79 echo 4xAD386A in DL785 G5 SLES11B6, HP/vendor drivers
     80 echo four dl585 G5 clients rh5.2, each with two AD386A
     81 
     82 # and here we go
     83   if [ $DO_STREAM -eq 1 ]; then
     84   echo TCP_STREAM
     85   for i in $concurrent_sessions; do
     86     j=0; 
     87     NETUUID=`netperf -t uuid`;
     88     echo $i concurrent streams id $NETUUID;
     89     while [ $j -lt $i ]; do 
     90       client=`expr $j % $num_cli` ;
     91       netperf $HDR -t omni -c -C -H ${remote_hosts[$client]} -l $length $confidence -- $CSV -H ${remote_hosts[$client]} $socket_sizes -m 64K -u $NETUUID & HDR="-P 0";
     92       j=`expr $j + 1`;
     93     done;
     94     wait;
     95   done
     96   fi
     97 #
     98   if [ $DO_MAERTS -eq 1 ]; then
     99   echo TCP_MAERTS
    100   for i in $concurrent_sessions; do
    101     j=0;
    102     NETUUID=`netperf -t uuid`;
    103     echo $i concurrent streams id $NETUUID;
    104     while [ $j -lt $i ]; do
    105       client=`expr $j % $num_cli` ;
    106       netperf $HDR -t omni -c -C -H ${remote_hosts[$client]} -l $length $confidence -- $CSV -H ${remote_hosts[$client]} $socket_sizes -M ,64K -u $NETUUID & HDR="-P 0";
    107       j=`expr $j + 1`;
    108     done;
    109     wait;
    110   done
    111   fi
    112 
    113   if [ $DO_BIDIR -eq 1 ]; then
    114   echo bidir TCP_RR MEGABITS
    115   HDR="-P 1"
    116   for i in $concurrent_sessions;
    117     do j=0;
    118     NETUUID=`netperf -t uuid`;
    119     echo $i concurrent streams id $NETUUID;
    120     while [ $j -lt $i ]; do
    121       client=`expr $j % $num_cli` ;
    122       netperf $HDR  -t omni -f m -c -C -H ${remote_hosts[$client]} -l $length $confidence -- $CSV  -H ${remote_hosts[$client]} -s 1M -S 1M -r 64K -b 12 -u $NETUUID & HDR="-P 0";
    123       j=`expr $j + 1`;
    124     done;
    125     wait;
    126   done
    127   fi
    128 
    129   if [ $DO_RRAGG -eq 1 ]; then
    130   echo TCP_RR aggregates
    131   HDR="-P 1"
    132   for i in $concurrent_sessions; do
    133     NETUUID=`netperf -t uuid`;
    134     echo $i concurrent streams id $NETUUID;
    135     for b in $burst_sizes; do
    136       echo burst of $b;
    137       j=0;
    138       while [ $j -lt $i ]; do
    139         client=`expr $j % $num_cli` ;
    140         netperf $HDR  -t omni -f x -c -C -H ${remote_hosts[$client]} -l $length $confidence -- $CSV  -H ${remote_hosts[$client]} -r 1 -b $b -D -u $NETUUID & HDR="-P 0";
    141         j=`expr $j + 1`;
    142       done;
    143       wait;
    144     done;
    145   done
    146   fi
    147 
    148 cat /proc/meminfo
    149