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/swptest, revision 1.2

1.1       ths         1: #!/bin/bash
                      2:
                      3: trap "killall lt-nutssd lt-slinkapp" SIGINT SIGTERM
                      4:
                      5: if [ "$#" == "0" ]; then
                      6:     echo -e "Usage:\n  swptest num"
                      7:     exit 0
                      8: fi
                      9:
                     10: if [ ! -x "./slinkapp" -o ! -x "./nutssd" ]; then
                     11:     echo "Cannot file slinkapp and nutssd."
                     12:     echo "The test must be run from the nutss/test directory"
                     13:     exit 0
                     14: fi
                     15:
                     16: mkdir -p output
                     17:
1.2     ! ths        18: ./nutssd -stwn -r sip.nutss.net:5060 -p ths1 ths1@nutss.net >output/debug_registrar.txt 2>&1 &
1.1       ths        19:
                     20: for i in $(seq 1 $1); do
                     21:     ./slinkapp $i 2>&1 | tee output/debug_node$i.txt | grep SWLOG | tee output/swlog_node$i.txt |
                     22:         grep 'DEGREE.*}$' | sed 's/@[^,} ]*//g' | sed 's/<sip:test/node/g' >output/degree_node$i.txt &
                     23: done
                     24:
                     25: watch "cat output/output_node* |
                     26: awk '
                     27: {
                     28:     if (\$2 == \"RCVD\" && \$3 == \"REQUEST\") {
                     29:         a[\$1,\$7]++;
                     30:         s[\$1]++;
                     31:         e[\$7]++;
                     32:     }
                     33: }
                     34: END {
                     35:     printf \"R\\\\S\\t\";
                     36:     for(n in s)
                     37:         printf n\"\\t\";
                     38:     printf \"\\n\";
                     39:     for(n in s) {
                     40:         printf n\"\\t\";
                     41:         for(m in s)
                     42:             printf a[n,m]\"\\t\";
                     43:         printf \"\\t\"s[n]\"\\n\";
                     44:     }
                     45:     printf \"\\n\\t\";
                     46:     for(n in s)
                     47:         printf e[n]\"\\t\";
                     48:     printf \"\\n\"
                     49: }';
                     50: echo;
                     51: ls output/degree_node*.txt |
                     52: while read i; do
                     53:     tail -n2 \$i | head -n1 | awk '{print \$3\" \"\$5\" \"\$6\"\\t\"\$7;}';
                     54: done;
                     55: "

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