Re: [ns] awk script for calculating end to end delay in a wired-wireless scenario

2009-08-17 Thread David McMullin

hi,

Because of inconsistencies in the trace format, sometimes the node id
is given in a hierarchical way (eg, 0.0.1) and other times in a
decimal way (hierarchical addresses normally allocate bits as
10.11.11, so 1.0.1 becomes 4194305). It's generally simplest to have a
look through your trace file and figure out which id is being given to
which node under which circumstances. (eg., sending from a wired node
to a wired node seems to result in hierarchical addresses, but
receiving at a wireless node seems to result in the confusing decimal
format). Here's what I use for calculating loss, it should get you
started and make calculating throughput and delay easier.

#
#Hierarchical routing is used with bits allocated as 10.11.11,  #
#addresses must be converted#
#0.0.0 = 0  (our server node)   #
#1.0.0 = 4194304(our Access point node) #
#1.0.1 = 4194305(our destination node)  #
#

BEGIN{totaltime=input;}

/^+/  /0.0.0.0/  /1.0.1.0/  /Multimedia/{

   wtimefield=2
   wpacketidfield=12

   loss[int($wtimefield)]++;
   packet[$wpacketidfield]=1;

}


/^r/  / -Is 0.0/  / -Id 4194305.0/  /AGT/  /Multimedia/ {

   if(timefield==0 ||packetidfield==0) {
   for(i=1; i=NF; i++) {
   if($i==-t)
   timefield=i+1;
   if($i==-Ii)
   packetidfield=i+1;
   }
   }

   loss[int($timefield)]--;
   packet[$packetidfield] = 0;
}

END{
   for(i=0;itotaltime;i++)
   print i loss[i]*1000*8;
}

Good Luck,

David McMullin
Dublin City University.

2009/8/15 Oladapo Oluwadiya ooluwad...@yahoo.com:

 hello,

 does anyone have the awk script to calculate delay,throughput,packet loss in 
 a mixed scenario i.e. wired-wireless scenario?
 i will really appreciate it.
 regards.








[ns] awk script for calculating end to end delay in a wired-wireless scenario

2009-08-15 Thread Oladapo Oluwadiya

hello,

does anyone have the awk script to calculate delay,throughput,packet loss in a 
mixed scenario i.e. wired-wireless scenario?
i will really appreciate it.
regards.