Log In
New Account
  
 
Home My Page Project Tree Code Snippets Project Openings NUTSS
 
 
Summary Tracker Lists CVS Files
 

CVS | Administration

Annotation of libnutss/examples/swp_vl_test, revision 1.9

1.1       ths         1: #!/bin/bash
                      2:
                      3: trap "killall lt-nutssd lt-slinksvariableload" SIGINT SIGTERM
                      4:
                      5: if [ "$#" == "0" ]; then
1.9     ! ths         6:     echo -e "Usage:\n  swp_vl_test number_of_nodes number_of_peers time_limit percent_to_send max_flow_duration max_flow_weight max_load percent_to_finish"
1.1       ths         7:     exit 0
                      8: fi
                      9:
                     10: if [ ! -x "./slinksvariableload" -o ! -x "./nutssd" ]; then
                     11:     echo "Cannot file slinkapp and nutssd."
                     12:     echo "The test must be run from the libnutss/examples directory"
                     13:     exit 0
                     14: fi
                     15:
                     16: mkdir -p output
                     17: rm output/*
                     18:
1.9     ! ths        19: echo nodes: $1 > output/param1.txt
        !            20: echo peers: $2 > output/param2.txt
        !            21: echo time limit: $3 > output/param3.txt
        !            22: echo max flow duration: $4 > output/param4.txt
        !            23: echo max flow duration: $5 > output/param5.txt
        !            24: echo max flow weight: $6 > output/param6.txt
        !            25: echo max load: $7 > output/param7.txt
        !            26: echo max load: $8 > output/param8.txt
1.5       ths        27:
                     28: cat output/param* > output/args.txt
                     29: rm output/param*
                     30:
1.9     ! ths        31: killall lt-slinksvariableload
1.1       ths        32: killall lt-nutssd
1.2       ths        33: ./nutssd -stwn -r sip.nutss.net:5060 -p ths1 ths1@nutss.net >output/debug_registrar.txt &
1.1       ths        34:
1.2       ths        35: for i in $(seq $1); do
1.7       ths        36:       ./slinksvariableload $i $2 $3 $4 `expr $RANDOM % \( $5 / 4 \) + $5 - \( $5 / 8 \)` `expr $RANDOM % \( $6 / 4 \) + $6 - \( $6 / 8 \)` `expr $RANDOM % \( $7 / 4 \) + $7 - \( $7 / 8 \)` &
1.1       ths        37: done
                     38:
1.9     ! ths        39: ./slinksvariableload 99 $1 $2 $8 &
1.8       ths        40:
1.4       ths        41: #export K = `expr $1 + 1`
1.3       ths        42:
1.4       ths        43: #while true; do
                     44:      sleep 20
                     45:      ./slinksvariableload $K $2 $3 `expr $RANDOM % $4 + 1` `expr $RANDOM % $5 + 1` `expr $RANDOM % $6 + 1` &
                     46:      export K = `expr $K + 1`
                     47: #done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
 

GForge.cis.cornell.edu is brought to you by

Cornell Computing and Information Science


Powered By GForge Collaborative Development Environment