NS2 , AWK script for finding the packet delivery ratio

NS2 , AWK script for finding the packet delivery ratio - welcome to our blog that presents the full content How Gadget, the discussion this time we're discussing that you find that NS2 , AWK script for finding the packet delivery ratio , we have provided complete information with images that are easy to understand, the explanation is simple but complete, therefore please read until the end :)

This is about : NS2 , AWK script for finding the packet delivery ratio
And this article : NS2 , AWK script for finding the packet delivery ratio

You can also see our article on:


NS2 , AWK script for finding the packet delivery ratio


Packet delivery ratio : the ratio of the number of delivered data packet to the destination. This illustrates the level of delivered data to the destination.
∑ Number of packet receive / ∑ Number of packet send
The greater value of packet delivery ratio means the better performance of the protocol.
###################################################################

# Initialization settings
BEGIN {

        sendLine = 0;
        recvLine = 0;
        fowardLine = 0;
        if(mseq==0)
mseq=10000;
for(i=0;i<mseq;i++){
rseq[i]=-1;
sseq[i]=-1;
}
}
# Applications received packet
$0 ~/^s.* AGT/ {
# if(sseq[$6]==-1){
        sendLine ++ ;
#       sseq[$6]=$6;
# }
}

# Applications to send packets
$0 ~/^r.* AGT/{
# if(rreq[$6]==-1){
        recvLine ++ ;
#         sseq[$6]=$6;
#        }

}


# Routing procedures to forward the packet
$0 ~/^f.* RTR/ {

        fowardLine ++ ;

}

# Final output
END {
        printf "cbr s:%d r:%d, r/s Ratio:%.4f, f:%d \n", sendLine, recvLine, (recvLine/sendLine),fowardLine;

}



###############################################################


Information NS2 , AWK script for finding the packet delivery ratio has been completed we present

A few of our information about the NS2 , AWK script for finding the packet delivery ratio , we hope you benefit from this article

You have just read the article NS2 , AWK script for finding the packet delivery ratio and many articles about gadget in our blog this, please read it. and url link of this article is https://howtomonetizeeverything.blogspot.com/2014/08/ns2-awk-script-for-finding-packet.html Hopefully discussion articles on provide more knowledge about the world of tech gadgets.

Tag :

0 Response to "NS2 , AWK script for finding the packet delivery ratio "

Post a Comment