Awk script for New Trace file format

355 views
Skip to first unread message

Andy tadesse

unread,
Mar 2, 2021, 8:00:37 AM3/2/21
to Network Simulator 2 (NS2)
Dear Knudfl,

May i get Awk scripts for Jitter ,Ende-to-end delay, Congestion window size for Ns2 new trace file format?

--

THANXS FOR YOUR RESPECT

Anduamlak Yitayeh(#NDY)

CPM Super Admin

Ethio-Telecom
Tel: +251 (0)911859866

knudfl

unread,
Mar 2, 2021, 12:47:08 PM3/2/21
to Network Simulator 2 (NS2)
→  https://drive.google.com/drive/folders/1rU_MFAEl1GCLMTJPLR3zbxPxkQQHkQ7T?usp=sharing
→  The latest overview is  z9-scripts-overview-9.txt
..... There is a lot of scripts for most analysis, and you will have to do tests yourself to find scripts matching your trace.

knudfl

unread,
Mar 2, 2021, 2:35:00 PM3/2/21
to Network Simulator 2 (NS2)
Jitter ...........................
$ awk -f Jitter2007.awk 50_num_nodes.tr  
Jitter1 = 127.52
Jitter2 = 191.81

$ awk -f 1Ayu-energy_wireless.awk 50_num_nodes.tr  
NRoverheads              = 0.732864
Jitter                   = 0.0153141
Delay                    = 0.025235
Total_Energy_Consumption = 0
Avg_Energy_Consumption   = 0
Overall Residual Energy  = -49
Avg Residual Energy      = -1

$ awk -f delay_-_jitter_alterado_einar.awk 50_num_nodes.tr  
0.00286154 0.00259488 0.00490556 0.00377629

$ awk -f energy_wireless.awk 50_num_nodes.tr  
No of pkts send                 18014
No of pkts recv                 17886
Pkt_delivery_ratio:             99.2894
Control_overhead:               13108
Normalized_routing_overheads:   0.732864
Delay:                          0.025235
Throughput:                     142371
Jitter:                         0.0153141
No of Pkts Dropped              128
Dropping_Ratio:                 0.710558
Total_Energy_Consumption:       0
Avg_Energy_Consumption:         0
Overall Residual Energy:        -49
Avg Residual Energy:            -1

$ awk -f en_wi.awk 50_num_nodes.tr  
NRoverheads              = 0.732864
Jitter                   = 0.0153141
Delay                    = 0.025235


End2end delay  ........................
$ awk -f Endtoenddelay.awk 50_num_nodes.tr :  ~20800~ lines are printed ..........

Andy tadesse

unread,
Mar 3, 2021, 3:27:13 AM3/3/21
to Network Simulator 2 (NS2)
Many Thanks sir !


--
You received this message because you are subscribed to the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-users/aacaa70a-f3f5-4dd1-848a-37e69821b7ecn%40googlegroups.com.

Andy tadesse

unread,
Mar 3, 2021, 6:47:01 AM3/3/21
to Network Simulator 2 (NS2)
Thanks sir!

 It's working for me too, but  what is the unit used for delay and JItter?  Is that ms or not?

--
You received this message because you are subscribed to the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.

Andy tadesse

unread,
Mar 3, 2021, 7:11:25 AM3/3/21
to Network Simulator 2 (NS2)
I guess the value we got for jitter and delay is in seconds so I can multiply it with 1000 to convert it in to ms.

And how to calculate the congestion window size using awk script?

knudfl

unread,
Mar 3, 2021, 7:52:42 AM3/3/21
to Network Simulator 2 (NS2)

knudfl

unread,
Mar 3, 2021, 7:57:05 AM3/3/21
to Network Simulator 2 (NS2)

Andy tadesse

unread,
Mar 3, 2021, 3:32:19 PM3/3/21
to Network Simulator 2 (NS2)
Many thanks sir !

The congestion window size is also working and I have able to plot it using Gnuplot .


Many thanks sir!

knudfl

unread,
Mar 3, 2021, 5:17:14 PM3/3/21
to Network Simulator 2 (NS2)
Example `cwnd´ with gnuplot .................
From https://drive.google.com/file/d/1Pt2ThmU42guM6LKnPluyOeRvHxf7c9XW/view?usp=sharing = cwnd-in-ex.txt
.... you will know the xcp examples,  i.e. ns-2.35/tcl/ex/xcp/.
Run the examples and get output files for xgraph .... one file is `xgraph_cwnd.tcp´.
................ A file edited to gnuplot : Lines 1 - 3 commented out with a # ,  new file name = xcp__xgraph_cwnd.tcp.txt
$ gnuplot
gnuplot> plot 'xcp__xgraph_cwnd.tcp.txt'
.... or gnuplot> plot 'xcp__xgraph_cwnd.tcp.txt' w lines
Reply all
Reply to author
Forward
0 new messages