Hi all,
i want to measure the performance of AODV protocol.
Initially i measured the performance of DSDV protocol using a awk script of
throughput and end-to-end delay given below !
I want to know if i can use the same script for AODV without any change or
i have to change something in it?
PLease respond to my post !!
############ THROUGHPUT #############
BEGIN {
recvdSize = 0
startTime = 400
stopTime = 0
}
{
event = $1
time = $2
node_id = $3
pkt_size = $8
level = $4
# Store start time
if (level == "AGT" && event == "s" && pkt_size >= 512) {
if (time < startTime) {
startTime = time
}
}
# Update total received packets' size and store packets arrival time
if (level == "AGT" && event == "r" && pkt_size >= 512) {
if (time > stopTime) {
stopTime = time
}
# Rip off the header
hdr_size = pkt_size % 512
pkt_size -= hdr_size
# Store received packet's size
recvdSize += pkt_size
}
}
END {
printf("Average Throughput[kbps] =
%.2f\n",(recvdSize)/(stopTime-startTime)*(8/1000));
#printf("StartTime=%.2f\n",startTime);
#printf("StopTime=%.2f\n",stopTime);
}
******* ENDTOEND DELAY *************
BEGIN {
seqno = -1;
droppedPackets = 0;
receivedPackets = 0;
count = 0;
}
{
#packet delivery ratio
if($4 == "AGT" && $1 == "s" && seqno < $6) {
seqno = $6;
} else if(($4 == "AGT") && ($1 == "r")) {
receivedPackets++;
} else if ($1 == "D" && $7 == "cbr" && $8 > 512){
droppedPackets++;
}
#end-to-end delay
if($4 == "AGT" && $1 == "s") {
start_time[$6] = $2;
} else if(($7 == "cbr") && ($1 == "r")) {
end_time[$6] = $2;
} else if($1 == "D" && $7 == "cbr") {
end_time[$6] = -1;
}
}
END {
for(i=0; i<=seqno; i++) {
if(end_time[i] > 0) {
delay[i] = end_time[i] - start_time[i];
count++;
}
else
{
delay[i] = -1;
}
}
for(i=0; i<count; i++) {
if(delay[i] > 0) {
n_to_n_delay = n_to_n_delay + delay[i];
}
}
n_to_n_delay = n_to_n_delay/count;
print "\n";
print "GeneratedPackets = " seqno+1;
print "ReceivedPackets = " receivedPackets;
print "Packet Delivery Ratio = " receivedPackets/(seqno+1)*100"%";
print "Total Dropped Packets = " droppedPackets;
print "Average End-to-End Delay = " n_to_n_delay * 1000 " ms";
print "\n";
}
please respond !
Thank you,
Kusumita
--
View this message in context:
http://network-simulator-ns-2.7690.n7.nabble.com/performance-of-aodv-tp27445.html
Sent from the ns-users mailing list archive at Nabble.com.