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.5

1.1       ths         1: #!/bin/bash
                      2:
                      3: trap "killall lt-nutssd lt-slinksvariableload" SIGINT SIGTERM
                      4:
                      5: if [ "$#" == "0" ]; then
1.4       ths         6:     echo -e "Usage:\n  swp_vl_test number_of_nodes number_of_peers time_limit max_flow_duration max_flow_weight max_load"
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.5     ! ths        19: echo nodes: $1 > output/param0.txt
        !            20: echo peers: $2 > output/param1.txt
        !            21: echo time limit: $3 > output/param2.txt
        !            22: echo max flow duration: $4 > output/param3.txt
        !            23: echo max flow weight: $5 > output/param4.txt
        !            24: echo max load: $6 > output/param5.txt
        !            25:
        !            26: cat output/param* > output/args.txt
        !            27: rm output/param*
        !            28:
1.1       ths        29: killall lt-nutssd
1.2       ths        30: ./nutssd -stwn -r sip.nutss.net:5060 -p ths1 ths1@nutss.net >output/debug_registrar.txt &
1.1       ths        31:
1.2       ths        32: for i in $(seq $1); do
1.5     ! ths        33:       ./slinksvariableload $i $2 $3 `expr $RANDOM % $4 + 1` `expr $RANDOM % $5 + 1` `expr $RANDOM % \( $6 / 10 \) + $6 + 1 ` &
1.1       ths        34: done
                     35:
1.4       ths        36: #export K = `expr $1 + 1`
1.3       ths        37:
1.4       ths        38: #while true; do
                     39:      sleep 20
                     40:      ./slinksvariableload $K $2 $3 `expr $RANDOM % $4 + 1` `expr $RANDOM % $5 + 1` `expr $RANDOM % $6 + 1` &
                     41:      export K = `expr $K + 1`
                     42: #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