LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-01-2015, 02:24 AM   #1
krist_chamber
LQ Newbie
 
Registered: Dec 2015
Location: Austria
Posts: 1

Rep: Reputation: Disabled
How to using NAM Trace format to find PDR, Packet Loss, Timeout, RTT in NS2?


Hey guys,
i do some project about ns2 right now but i didn't know how to analize my trace file. I found some awk file in some website and forum, and all of them are for wireless trace format. but my project used a wired trace format, so i have make awk file from nam trace format.

wireless trace format :
s -t 0.475592155 -Hs 4 -Hd -1 -Ni 4 -Nx 458.39 -Ny 331.86 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 4.255 -Id -1.255 -It message -Il 32 -If 0 -Ii 0 -Iv 32
(there is still have "s/r" as event identifier , so it's easy to calculate how much packet sent and received.)

NAM Trace Format :
r -t 0.44144 -s 5 -d 6 -p tcp -e 40 -c 1 -i 0 -a 1 -x {0.0 7.0 0 ------- null}
+ -t 0.44144 -s 6 -d 7 -p tcp -e 40 -c 1 -i 0 -a 1 -x {0.0 7.0 0 ------- null}
- -t 0.44144 -s 6 -d 7 -p tcp -e 40 -c 1 -i 0 -a 1 -x {0.0 7.0 0 ------- null}
r -t 0.4616 -s 6 -d 7 -p tcp -e 40 -c 1 -i 0 -a 1 -x {0.0 7.0 0 ------- null}
+ -t 0.4616 -s 7 -d 6 -p ack -e 40 -c 1 -i 1 -a 1 -x {7.0 0.0 0 ------- null}
- -t 0.4616 -s 7 -d 6 -p ack -e 40 -c 1 -i 1 -a 1 -x {7.0 0.0 0 ------- null}
(there is only have r/+/-/d event identifier, i didn't know how much packet sent ad received from that trace file.)

i need to make an awk to calculate PDR, Packet loss,RTT, Timeout Count and Throughput from nam trace format..
can anyone help me please??
 
Old 12-02-2015, 07:51 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,830

Rep: Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007
Quote:
Originally Posted by krist_chamber View Post
Hey guys,
i do some project about ns2 right now but i didn't know how to analize my trace file. I found some awk file in some website and forum, and all of them are for wireless trace format. but my project used a wired trace format, so i have make awk file from nam trace format.

wireless trace format :
s -t 0.475592155 -Hs 4 -Hd -1 -Ni 4 -Nx 458.39 -Ny 331.86 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 4.255 -Id -1.255 -It message -Il 32 -If 0 -Ii 0 -Iv 32
(there is still have "s/r" as event identifier , so it's easy to calculate how much packet sent and received.)

NAM Trace Format :
r -t 0.44144 -s 5 -d 6 -p tcp -e 40 -c 1 -i 0 -a 1 -x {0.0 7.0 0 ------- null}
+ -t 0.44144 -s 6 -d 7 -p tcp -e 40 -c 1 -i 0 -a 1 -x {0.0 7.0 0 ------- null}
- -t 0.44144 -s 6 -d 7 -p tcp -e 40 -c 1 -i 0 -a 1 -x {0.0 7.0 0 ------- null}
r -t 0.4616 -s 6 -d 7 -p tcp -e 40 -c 1 -i 0 -a 1 -x {0.0 7.0 0 ------- null}
+ -t 0.4616 -s 7 -d 6 -p ack -e 40 -c 1 -i 1 -a 1 -x {7.0 0.0 0 ------- null}
- -t 0.4616 -s 7 -d 6 -p ack -e 40 -c 1 -i 1 -a 1 -x {7.0 0.0 0 ------- null}
(there is only have r/+/-/d event identifier, i didn't know how much packet sent ad received from that trace file.)

i need to make an awk to calculate PDR, Packet loss,RTT, Timeout Count and Throughput from nam trace format..
can anyone help me please??
We will be happy to help you. Post what you have written so far, and tell us where you're stuck. See the "Question Guidelines" link in my posting signature.
 
Old 12-02-2015, 01:04 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Google : ns2 awk wired
https://www.google.com/webhp?hl=all&...=ns2+awk+wired

Examples ....

Throughput http://slogix.in/how-to-calculate-th...ns2/index.html

Perl Script for wired Network https://cloudns2.wordpress.com/perl-...wired-network/

AWK Files? https://cloudns2.wordpress.com/awk-files/

ns2 wired simulation http://ns2homeworkforbeginner.blogspot.dk/

awk scripts http://mailman.isi.edu/pipermail/ns-...er/044664.html

Etc. etc. 5,000 hits.


-
 
  


Reply

Tags
ns2


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
NS2 Nam and Trace Files are always empty RSM_smile Linux - Newbie 36 08-15-2017 03:50 PM
Calculation of rtt from ns2 trace file maria_seb Linux - Wireless Networking 1 03-20-2013 10:19 AM
NS2 new trace format RSM_smile Linux - Newbie 0 09-16-2012 08:37 AM
Problem with calculate loss packet and Mean delay in a a trace file of wimax maymouna Linux - Newbie 3 07-05-2011 06:06 PM

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

All times are GMT -5. The time now is 12:02 PM.

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