LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to calculate convergence time and number of updates of ns2 trace file (http://www.linuxquestions.org/questions/linux-software-2/how-to-calculate-convergence-time-and-number-of-updates-of-ns2-trace-file-941779/)

noorshabad 04-26-2012 12:53 AM

How to calculate convergence time and number of updates of ns2 trace file
 
Hello All,
I have BGP trace file from ns2 like below. Please somebody could suggest me how to find convergence time and number of updates from this trace file using awk or some equivalent script?
Trace fields means :
1. EVENT/Type identifier 2. time 3.Src node 4.Dst node 5. Packet Type 6. Packet size 7.Flags 8. Flow ID 9.Src addr 10.Dst addr 11. Seq Number 12. Pkt ID


Many Thanks!

+ 0.01 2 3 tcp 40 ------- 0 167772673.181 167772929.179 0 5
- 0.01 2 3 tcp 40 ------- 0 167772673.181 167772929.179 0 5
+ 0.01 3 2 tcp 40 ------- 0 167772929.180 167772673.179 0 6
- 0.01 3 2 tcp 40 ------- 0 167772929.180 167772673.179 0 6
+ 0.01 3 4 tcp 40 ------- 0 167772929.181 167773185.179 0 7
- 0.01 3 4 tcp 40 ------- 0 167772929.181 167773185.179 0 7
+ 0.01 4 3 tcp 40 ------- 0 167773185.180 167772929.179 0 8
- 0.01 4 3 tcp 40 ------- 0 167773185.180 167772929.179 0 8
+ 0.01 4 5 tcp 40 ------- 0 167773185.181 167773441.179 0 9
- 0.01 4 5 tcp 40 ------- 0 167773185.181 167773441.179 0 9
+ 0.01 5 4 tcp 40 ------- 0 167773441.180 167773185.179 0 10
- 0.01 5 4 tcp 40 ------- 0 167773441.180 167773185.179 0 10
+ 0.01 5 6 tcp 40 ------- 0 167773441.181 167773697.179 0 11
- 0.01 5 6 tcp 40 ------- 0 167773441.181 167773697.179 0 11
+ 0.01 6 5 tcp 40 ------- 0 167773697.180 167773441.179 0 12
- 0.01 6 5 tcp 40 ------- 0 167773697.180 167773441.179 0 12
+ 0.01 6 0 tcp 40 ------- 0 167773697.181 167772161.179 0 13
- 0.01 6 0 tcp 40 ------- 0 167773697.181 167772161.179 0 13
r 0.02032 0 1 tcp 40 ------- 0 167772161.180 167772417.179 0 0
+ 0.02032 1 0 ack 40 ------- 0 167772417.179 167772161.180 0 14
- 0.02032 1 0 ack 40 ------- 0 167772417.179 167772161.180 0 14
r 0.02032 0 6 tcp 40 ------- 0 167772161.181 167773697.179 0 1
+ 0.02032 6 0 ack 40 ------- 0 167773697.179 167772161.181 0 15
- 0.02032 6 0 ack 40 ------- 0 167773697.179 167772161.181 0 15
r 0.02032 1 0 tcp 40 ------- 0 167772417.180 167772161.179 0 2
+ 0.02032 0 1 ack 40 ------- 0 167772161.179 167772417.180 0 16
- 0.02032 0 1 ack 40 ------- 0 167772161.179 167772417.180 0 16
r 0.02032 1 2 tcp 40 ------- 0 167772417.181 167772673.179 0 3
+ 0.02032 2 1 ack 40 ------- 0 167772673.179 167772417.181 0 17
- 0.02032 2 1 ack 40 ------- 0 167772673.179 167772417.181 0 17
r 0.02032 2 1 tcp 40 ------- 0 167772673.180 167772417.179 0 4
+ 0.02032 1 2 ack 40 ------- 0 167772417.179 167772673.180 0 18
- 0.02032 1 2 ack 40 ------- 0 167772417.179 167772673.180 0 18
r 0.02032 2 3 tcp 40 ------- 0 167772673.181 167772929.179 0 5
+ 0.02032 3 2 ack 40 ------- 0 167772929.179 167772673.181 0 19
- 0.02032 3 2 ack 40 ------- 0 167772929.179 167772673.181 0 19
r 0.02032 3 2 tcp 40 ------- 0 167772929.180 167772673.179 0 6
+ 0.02032 2 3 ack 40 ------- 0 167772673.179 167772929.180 0 20
- 0.02032 2 3 ack 40 ------- 0 167772673.179 167772929.180 0 20
r 0.02032 3 4 tcp 40 ------- 0 167772929.181 167773185.179 0 7
+ 0.02032 4 3 ack 40 ------- 0 167773185.179 167772929.181 0 21
- 0.02032 4 3 ack 40 ------- 0 167773185.179 167772929.181 0 21
r 0.02032 4 3 tcp 40 ------- 0 167773185.180 167772929.179 0 8
+ 0.02032 3 4 ack 40 ------- 0 167772929.179 167773185.180 0 22
- 0.02032 3 4 ack 40 ------- 0 167772929.179 167773185.180 0 22
r 0.02032 4 5 tcp 40 ------- 0 167773185.181 167773441.179 0 9
+ 0.02032 5 4 ack 40 ------- 0 167773441.179 167773185.181 0 23
- 0.02032 5 4 ack 40 ------- 0 167773441.179 167773185.181 0 23
r 0.02032 5 4 tcp 40 ------- 0 167773441.180 167773185.179 0 10
+ 0.02032 4 5 ack 40 ------- 0 167773185.179 167773441.180 0 24
- 0.02032 4 5 ack 40 ------- 0 167773185.179 167773441.180 0 24
r 0.02032 5 6 tcp 40 ------- 0 167773441.181 167773697.179 0 11
+ 0.02032 6 5 ack 40 ------- 0 167773697.179 167773441.181 0 25
- 0.02032 6 5 ack 40 ------- 0 167773697.179 167773441.181 0 25
r 0.02032 6 5 tcp 40 ------- 0 167773697.180 167773441.179 0 12
+ 0.02032 5 6 ack 40 ------- 0 167773441.179 167773697.180 0 26
- 0.02032 5 6 ack 40 ------- 0 167773441.179 167773697.180 0 26
r 0.02032 6 0 tcp 40 ------- 0 167773697.181 167772161.179 0 13
+ 0.02032 0 6 ack 40 ------- 0 167772161.179 167773697.181 0 27
- 0.02032 0 6 ack 40 ------- 0 167772161.179 167773697.181 0 27
r 0.03064 1 0 ack 40 ------- 0 167772417.179 167772161.180 0 14
+ 0.03064 0 1 tcp 40 ------- 0 167772161.180 167772417.179 1 28
- 0.03064 0 1 tcp 40 ------- 0 167772161.180 167772417.179 1 28
+ 0.03064 0 1 tcp 40 ------- 0 167772161.180 167772417.179 1 29
r 0.03064 6 0 ack 40 ------- 0 167773697.179 167772161.181 0 15
+ 0.03064 0 6 tcp 40 ------- 0 167772161.181 167773697.179 1 30
- 0.03064 0 6 tcp 40 ------- 0 167772161.181 167773697.179 1 30
+ 0.03064 0 6 tcp 40 ------- 0 167772161.181 167773697.179 1 31
r 0.03064 0 1 ack 40 ------- 0 167772161.179 167772417.180 0 16
+ 0.03064 1 0 tcp 40 ------- 0 167772417.180 167772161.179 1 32
- 0.03064 1 0 tcp 40 ------- 0 167772417.180 167772161.179 1 32
+ 0.03064 1 0 tcp 40 ------- 0 167772417.180 167772161.179 1 33
r 0.03064 2 1 ack 40 ------- 0 167772673.179 167772417.181 0 17
+ 0.03064 1 2 tcp 40 ------- 0 167772417.181 167772673.179 1 34
- 0.03064 1 2 tcp 40 ------- 0 167772417.181 167772673.179 1 34
+ 0.03064 1 2 tcp 40 ------- 0 167772417.181 167772673.179 1 35
r 0.03064 1 2 ack 40 ------- 0 167772417.179 167772673.180 0 18
+ 0.03064 2 1 tcp 40 ------- 0 167772673.180 167772417.179 1 36
- 0.03064 2 1 tcp 40 ------- 0 167772673.180 167772417.179 1 36
+ 0.03064 2 1 tcp 40 ------- 0 167772673.180 167772417.179 1 37
r 0.03064 3 2 ack 40 ------- 0 167772929.179 167772673.181 0 19
+ 0.03064 2 3 tcp 40 ------- 0 167772673.181 167772929.179 1 38
- 0.03064 2 3 tcp 40 ------- 0 167772673.181 167772929.179 1 38

lovsis 11-22-2012 12:24 PM

hello, have u been able to collect the convergence time and number of updates from the trace file? i having the same issues. If you could help will be very much appreciated.


All times are GMT -5. The time now is 11:31 PM.