#display graph of Nth connection #usage show_tcp_con trace_file N awk -f show_tcp_con.awk N=$2 $1 >tmp.out awk '$1=="+" && $5=="tcp" {if ( ($3 %4)==3 ) print $2 "\t" $11}' tmp.out >plots/snd_data.plot awk '$1=="r" && $5=="ack" {if ( ($4 %4)==3 ) {if ($13==0) t=$11; else t=$13; print $2 "\t" t}}' tmp.out >plots/snd_ack.plot awk '$1=="r" && $5=="tcp" && $3%5==0 {print $2 "\t" $11}' tmp.out >plots/rcv_data.plot awk '$1=="+" && $5=="ack" && $4%5==0 {print $2 "\t" $13}' tmp.out >plots/rcv_ack.plot cd plots xgraph -P snd_data.plot snd_ack.plot #xgraph -P rcv_data.plot rcv_ack.plot cd ..