LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 05-09-2013, 02:33 PM   #1
Ashish Kots
LQ Newbie
 
Registered: May 2013
Posts: 1

Rep: Reputation: Disabled
OLSR implementation in NS2


Hi while running the .awk script to find out the end to end delay, jitter, throughput. I am getting the the following error line 44 " Fatal error: division by zero attempted". I am using the following script

BEGIN {
seqno = -1;
droppedPackets = 0;
receivedPackets = 0;
count = 0;
}

{

#packet delivery ratio
if($19 == "AGT" && $1 == "s" && seqno < $47) {
seqno = $47;
} else if(($19 == "AGT") && ($1 == "r")) {
receivedPackets++;
} else if ($1 == "d" && $35 == "tcp" && ($21 == "CBK" || $21 == "NRTE")){
droppedPackets++;
}
#end-to-end delay
if($19 == "AGT" && $1 == "s") {
start_time[$47] = $3;
} else if(($35 == "tcp") && ($1 == "r")) {
end_time[$47] = $3;
} else if($1 == "d" && $35 == "tcp") {
end_time[$47] = -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";
}


This is my trace file format.

M 0.00000 0 (0.00, 0.00, 0.00), (100.00, 100.00), 3000.00
M 0.00000 1 (0.00, 0.00, 0.00), (200.00, 200.00), 3000.00
M 0.00000 2 (0.00, 0.00, 0.00), (300.00, 200.00), 3000.00
M 0.00000 3 (0.00, 0.00, 0.00), (400.00, 300.00), 3000.00
M 0.00000 4 (0.00, 0.00, 0.00), (500.00, 300.00), 3000.00
M 0.00000 5 (0.00, 0.00, 0.00), (600.00, 400.00), 3000.00
s 0.056904124 _3_ RTR --- 0 OLSR 48 [0 0 0 0] ------- [3:255 -1:255 32 0] [1 0 [HELLO 3 0 0]]
s 0.057219124 _3_ MAC --- 0 OLSR 106 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0] [1 0 [HELLO 3 0 0]]
r 0.058067156 _2_ MAC --- 0 OLSR 48 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0] [1 0 [HELLO 3 0 0]]
r 0.058067156 _5_ MAC --- 0 OLSR 48 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0] [1 0 [HELLO 3 0 0]]
r 0.058067183 _4_ MAC --- 0 OLSR 48 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0] [1 0 [HELLO 3 0 0]]
r 0.058067205 _1_ MAC --- 0 OLSR 48 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0] [1 0 [HELLO 3 0 0]]
r 0.058067249 _0_ MAC --- 0 OLSR 48 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0] [1 0 [HELLO 3 0 0]]
r 0.058092156 _2_ RTR --- 0 OLSR 48 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0] [1 0 [HELLO 3 0 0]]
r 0.058092156 _5_ RTR --- 0 OLSR 48 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0] [1 0 [HELLO 3 0 0]]
r 0.058092183 _4_ RTR --- 0 OLSR 48 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0] [1 0 [HELLO 3 0 0]]
r 0.058092205 _1_ RTR --- 0 OLSR 48 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0] [1 0 [HELLO 3 0 0]]
r 0.058092249 _0_ RTR --- 0 OLSR 48 [0 ffffffff 3 800] ------- [3:255 -1:255 32 0] [1 0 [HELLO 3 0 0]]
s 0.082072703 _2_ RTR --- 1 OLSR 48 [0 0 0 0] ------- [2:255 -1:255 32 0] [1 0 [HELLO 2 0 0]]
s 0.082327703 _2_ MAC --- 1 OLSR 106 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0] [1 0 [HELLO 2 0 0]]
r 0.083175703 _5_ MAC --- 1 OLSR 48 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0] [1 0 [HELLO 2 0 0]]
r 0.083175742 _4_ MAC --- 1 OLSR 48 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0] [1 0 [HELLO 2 0 0]]
r 0.083175749 _3_ MAC --- 1 OLSR 48 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0] [1 0 [HELLO 2 0 0]]
r 0.083175866 _1_ MAC --- 1 OLSR 48 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0] [1 0 [HELLO 2 0 0]]
r 0.083176076 _0_ MAC --- 1 OLSR 48 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0] [1 0 [HELLO 2 0 0]]
r 0.083200703 _5_ RTR --- 1 OLSR 48 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0] [1 0 [HELLO 2 0 0]]
r 0.083200742 _4_ RTR --- 1 OLSR 48 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0] [1 0 [HELLO 2 0 0]]
r 0.083200749 _3_ RTR --- 1 OLSR 48 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0] [1 0 [HELLO 2 0 0]]
r 0.083200866 _1_ RTR --- 1 OLSR 48 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0] [1 0 [HELLO 2 0 0]]
r 0.083201076 _0_ RTR --- 1 OLSR 48 [0 ffffffff 2 800] ------- [2:255 -1:255 32 0] [1 0 [HELLO 2 0 0]]
s 0.087402627 _4_ RTR --- 2 OLSR 48 [0 0 0 0] ------- [4:255 -1:255 32 0] [1 0 [HELLO 4 0 0]]
s 0.087877627 _4_ MAC --- 2 OLSR 106 [0 ffffffff 4 800] ------- [4:255 -1:255 32 0] [1 0 [HELLO 4 0 0]]
r 0.088725669 _2_ MAC --- 2 OLSR 48 [0 ffffffff 4 800] ------- [4:255 -1:255 32 0] [1 0 [HELLO 4 0 0]]
r 0.088725669 _5_ MAC --- 2 OLSR 48 [0 ffffffff 4 800] ------- [4:255 -1:255 32 0] [1 0 [HELLO 4 0 0]]
r 0.088725717 _3_ MAC --- 2 OLSR 48 [0 ffffffff 4 800] ------- [4:255 -1:255 32 0] [1 0 [HELLO 4 0 0]]
r 0.088725842 _1_ MAC --- 2 OLSR 48 [0 ffffffff 4 800] ------- [4:255 -1:255 32 0] [1 0 [HELLO 4 0 0]]
r 0.088726064 _0_ MAC --- 2 OLSR 48 [0 ffffffff 4 800] ------- [4:255 -1:255 32 0] [1 0 [HELLO 4 0 0]]
r 0.088750669 _2_ RTR --- 2 OLSR 48 [0 ffffffff 4 800] ------- [4:255 -1:255 32 0] [1 0 [HELLO 4 0 0]]
r 0.088750669 _5_ RTR --- 2 OLSR 48 [0 ffffffff 4 800] ------- [4:255 -1:255 32 0] [1 0 [HELLO 4 0 0]]
r 0.088750717 _3_ RTR --- 2 OLSR 48 [0 ffffffff 4 800] ------- [4:255 -1:255 32 0] [1 0 [HELLO 4 0 0]]
r 0.088750842 _1_ RTR --- 2 OLSR 48 [0 ffffffff 4 800] ------- [4:255 -1:255 32 0] [1 0 [HELLO 4 0 0]]
r 0.088751064 _0_ RTR --- 2 OLSR 48 [0 ffffffff 4 800] ------- [4:255 -1:255 32 0] [1 0 [HELLO 4 0 0]]
s 0.156480886 _0_ RTR --- 3 OLSR 48 [0 0 0 0] ------- [0:255 -1:255 32 0] [1 0 [HELLO 0 0 0]]
s 0.156915886 _0_ MAC --- 3 OLSR 106 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0] [1 0 [HELLO 0 0 0]]
r 0.157764357 _1_ MAC --- 3 OLSR 48 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0] [1 0 [HELLO 0 0 0]]
r 0.157764631 _2_ MAC --- 3 OLSR 48 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0] [1 0 [HELLO 0 0 0]]
r 0.157789357 _1_ RTR --- 3 OLSR 48 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0] [1 0 [HELLO 0 0 0]]
r 0.157789631 _2_ RTR --- 3 OLSR 48 [0 ffffffff 0 800] ------- [0:255 -1:255 32 0] [1 0 [HELLO 0 0 0]]
s 0.174370513 _5_ RTR --- 4 OLSR 48 [0 0 0 0] ------- [5:255 -1:255 32 0] [1 0 [HELLO 5 0 0]]
s 0.174745513 _5_ MAC --- 4 OLSR 106 [0 ffffffff 5 800] ------- [5:255 -1:255 32 0] [1 0 [HELLO 5 0 0]]
r 0.175593596 _4_ MAC --- 4 OLSR 48 [0 ffffffff 5 800] ------- [5:255 -1:255 32 0] [1 0 [HELLO 5 0 0]]
r 0.175593637 _3_ MAC --- 4 OLSR 48 [0 ffffffff 5 800] ------- [5:255 -1:255 32 0] [1 0 [HELLO 5 0 0]]
r 0.175594058 _2_ MAC --- 4 OLSR 48 [0 ffffffff 5 800] ------- [5:255 -1:255 32 0] [1 0 [HELLO 5 0 0]]
r 0.175618596 _4_ RTR --- 4 OLSR 48 [0 ffffffff 5 800] ------- [5:255 -1:255 32 0] [1 0 [HELLO 5 0 0]]
r 0.175618637 _3_ RTR --- 4 OLSR 48 [0 ffffffff 5 800] ------- [5:255 -1:255 32 0] [1 0 [HELLO 5 0 0]]
r 0.175619058 _2_ RTR --- 4 OLSR 48 [0 ffffffff 5 800] ------- [5:255 -1:255 32 0] [1 0 [HELLO 5 0 0]]
s 0.319432572 _1_ RTR --- 5 OLSR 48 [0 0 0 0] ------- [1:255 -1:255 32 0] [1 0 [HELLO 1 0 0]]
s 0.319647572 _1_ MAC --- 5 OLSR 106 [0 ffffffff 1 800] ------- [1:255 -1:255 32 0] [1 0 [HELLO 1 0 0]]
r 0.320495905 _2_ MAC --- 5 OLSR 48 [0 ffffffff 1 800] ------- [1:255 -1:255 32 0] [1 0 [HELLO 1 0 0]]
r 0.320496043 _0_ MAC --- 5 OLSR 48 [0 ffffffff 1 800] ------- [1:255 -1:255 32 0] [1 0 [HELLO 1 0 0]]
r 0.320496317 _3_ MAC --- 5 OLSR 48 [0 ffffffff 1 800] ------- [1:255 -1:255 32 0] [1 0 [HELLO 1 0 0]]
r 0.320520905 _2_ RTR --- 5 OLSR 48 [0 ffffffff 1 800] ------- [1:255 -1:255 32 0] [1 0 [HELLO 1 0 0]]
r 0.320521043 _0_ RTR --- 5 OLSR 48 [0 ffffffff 1 800] ------- [1:255 -1:255 32 0] [1 0 [HELLO 1 0 0]]
r 0.320521317 _3_ RTR --- 5 OLSR 48 [0 ffffffff 1 800] ------- [1:255 -1:255 32 0] [1 0 [HELLO 1 0 0]]
r 0.500000000 _0_ RTR --- 6 cbr 1000 [0 0 0 0] ------- [0:2 5:0 32 0] [0] 0 0
D 0.500000000 _0_ RTR NRTE 6 cbr 1020 [0 0 0 0] ------- [0:2 5:0 31 0] [0] 0 0
r 0.500000000 _2_ RTR --- 7 cbr 1000 [0 0 0 0] ------- [2:2 3:0 32 0] [0] 0 0
D 0.500000000 _2_ RTR NRTE 7 cbr 1020 [0 0 0 0] ------- [2:2 3:0 31 0] [0] 0 0
r 0.515000000 _0_ RTR --- 8 cbr 1000 [0 0 0 0] ------- [0:2 5:0 32 0] [1] 0 0
D 0.515000000 _0_ RTR NRTE 8 cbr 1020 [0 0 0 0] ------- [0:2 5:0 31 0] [1] 0 0
r 0.515000000 _2_ RTR --- 9 cbr 1000 [0 0 0 0] ------- [2:2 3:0 32 0] [1] 0 0
D 0.515000000 _2_ RTR NRTE 9 cbr 1020 [0 0 0 0] ------- [2:2 3:0 31 0] [1] 0 0
r 0.530000000 _0_ RTR --- 10 cbr 1000 [0 0 0 0] ------- [0:2 5:0 32 0] [2] 0 0
D 0.530000000 _0_ RTR NRTE 10 cbr 1020 [0 0 0 0] ------- [0:2 5:0 31 0] [2] 0 0
r 0.530000000 _2_ RTR --- 11 cbr 1000 [0 0 0 0] ------- [2:2 3:0 32 0] [2] 0 0
D 0.530000000 _2_ RTR NRTE 11 cbr 1020 [0 0 0 0] ------- [2:2 3:0 31 0] [2] 0 0
r 0.545000000 _0_ RTR --- 12 cbr 1000 [0 0 0 0] ------- [0:2 5:0 32 0] [3] 0 0
D 0.545000000 _0_ RTR NRTE 12 cbr 1020 [0 0 0 0] ------- [0:2 5:0 31 0] [3] 0 0
r 0.545000000 _2_ RTR --- 13 cbr 1000 [0 0 0 0] ------- [2:2 3:0 32 0] [3] 0 0
D 0.545000000 _2_ RTR NRTE 13 cbr 1020 [0 0 0 0] ------- [2:2 3:0 31 0] [3] 0 0
r 0.560000000 _0_ RTR --- 14 cbr 1000 [0 0 0 0] ------- [0:2 5:0 32 0] [4] 0 0
D 0.560000000 _0_ RTR NRTE 14 cbr 1020 [0 0 0 0] ------- [0:2 5:0 31 0] [4] 0 0
r 0.560000000 _2_ RTR --- 15 cbr 1000 [0 0 0 0] ------- [2:2 3:0 32 0] [4] 0 0
D 0.560000000 _2_ RTR NRTE 15 cbr 1020 [0 0 0 0] ------- [2:2 3:0 31 0] [4] 0 0
r 0.575000000 _0_ RTR --- 16 cbr 1000 [0 0 0 0] ------- [0:2 5:0 32 0] [5] 0 0
D 0.575000000 _0_ RTR NRTE 16 cbr 1020 [0 0 0 0] ------- [0:2 5:0 31 0] [5] 0 0
r 0.575000000 _2_ RTR --- 17 cbr 1000 [0 0 0 0] ------- [2:2 3:0 32 0] [5] 0 0
D 0.575000000 _2_ RTR NRTE 17 cbr 1020 [0 0 0 0] ------- [2:2 3:0 31 0] [5] 0 0
r 0.590000000 _0_ RTR --- 18 cbr 1000 [0 0 0 0] ------- [0:2 5:0 32 0] [6] 0 0
D 0.590000000 _0_ RTR NRTE 18 cbr 1020 [0 0 0 0] ------- [0:2 5:0 31 0] [6] 0 0
r 0.590000000 _2_ RTR --- 19 cbr 1000 [0 0 0 0] ------- [2:2 3:0 32 0] [6] 0 0
D 0.590000000 _2_ RTR NRTE 19 cbr 1020 [0 0 0 0] ------- [2:2 3:0 31 0] [6] 0 0
r 0.605000000 _0_ RTR --- 20 cbr 1000 [0 0 0 0] ------- [0:2 5:0 32 0] [7] 0 0
D 0.605000000 _0_ RTR NRTE 20 cbr 1020 [0 0 0 0] ------- [0:2 5:0 31 0] [7] 0 0
r 0.605000000 _2_ RTR --- 21 cbr 1000 [0 0 0 0] ------- [2:2 3:0 32 0] [7] 0 0
D 0.605000000 _2_ RTR NRTE 21 cbr 1020 [0 0 0 0] ------- [2:2 3:0 31 0] [7] 0 0
r 0.620000000 _0_ RTR --- 22 cbr 1000 [0 0 0 0] ------- [0:2 5:0 32 0] [8] 0 0
D 0.620000000 _0_ RTR NRTE 22 cbr 1020 [0 0 0 0] ------- [0:2 5:0 31 0] [8] 0 0
r 0.620000000 _2_ RTR --- 23 cbr 1000 [0 0 0 0] ------- [2:2 3:0 32 0] [8] 0 0
D 0.620000000 _2_ RTR NRTE 23 cbr 1020 [0 0 0 0] ------- [2:2 3:0 31 0] [8] 0 0
r 0.635000000 _0_ RTR --- 24 cbr 1000 [0 0 0 0] ------- [0:2 5:0 32 0] [9] 0 0
D
 
Old 05-18-2013, 06:08 AM   #2
nuriko_ljc
LQ Newbie
 
Registered: May 2013
Posts: 1

Rep: Reputation: Disabled
OLSR

u can use Ns Analyser to generate the graph, it is much easier, by the way, can u teach me how u patch the OLSR protocol successfully?
 
Old 05-18-2013, 06:25 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,439

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
# 2, @nuriko_ljc : Welcome to LQ.

OLSR at LQ : http://www.linuxquestions.org/questions/tags/olsr/
http://www.linuxquestions.org/questions/tags/um-olsr/

Install example: cd ns-allinone-2.34/ && patch -p0 < um-olsr-2.34_v0.8.8.patch
export CC=gcc41 CXX=g++41 && ./install ,
ref. #4 http://www.linuxquestions.org/questi...-4175447445/#4

Latest is http://sourceforge.net/projects/um-olsr/ > um-olsr-1.0.tgz

If you want a detailed answer, the OS must be specified :
1) $ cat /etc/*release* <Enter>
2) $ uname -m <Enter>
 
  


Reply

Tags
ns2, olsr


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
for Leach implementation on ns2.35 sitender Ubuntu 1 03-19-2013 11:39 AM
ns2 installation on ubuntu with olsr patch giving following error bhushan0710 Linux - Newbie 8 01-21-2013 05:09 AM
security implementation in ns2 seetha Linux - Newbie 1 01-28-2012 05:33 AM
Regarding NS2 implementation lalithimral Programming 1 05-03-2011 05:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 05:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration