I am sure that this has been answered before, but I, for the life of me, 
couldn't find what I think I need.  I have been trying to figure this 
out for a day or two now.

I am trying to create graphs for RTT and throughput.  I have seen links 
mentioned to a university website (

//http://www-mash.cs.berkeley.edu/dist/archive/ns-users/0002/0030.html)//

, but those pages aren't there anymore.  I have found numerous 
Throughput calculations, but they all seem to be about overall 
throughput.  (We are modeling random traffic, so are more interested in 
a more instantaneous throughput.  Not EXACTLY instantaneous, but over a 
smaller window than the entire simulation.)

For RTT, I am kind of stuck.  Yes, I have traced 'cwnd_' and 'rtt_' and 
looked at the file.  (Curiously, my RTT trace file (different from my 
cwnd_ trace file) only has one line in it.)

Here is a clip (1st 10 lines) from the file, plus some headers that I am 
guessing at:

Time                    Type    Value
0.00000  -1 -1 -1 -1 cwnd_ 1.000
1.29029  5  0  1  3  rtt_ 0.050
1.29029  5  0  1  3  cwnd_ 2.000
1.35309  5  0  1  3  rtt_ 0.070
1.35309  5  0  1  3  cwnd_ 3.000
1.35986  5  0  1  3  cwnd_ 4.000
1.40282  5  0  1  3  rtt_ 0.050
1.40282  5  0  1  3  cwnd_ 5.000
1.40959  5  0  1  3  cwnd_ 6.000
1.41635  5  0  1  3  cwnd_ 7.000



Here's the corresponding overall out.tr (1st 30 or so lines):

+ 0.004717 2 0 tcp 40 ------- 1 2.0 1.0 0 0
- 0.004717 2 0 tcp 40 ------- 1 2.0 1.0 0 0
r 0.005749 2 0 tcp 40 ------- 1 2.0 1.0 0 0
+ 0.005749 0 1 tcp 40 ------- 1 2.0 1.0 0 0
- 0.005749 0 1 tcp 40 ------- 1 2.0 1.0 0 0
r 0.026206 0 1 tcp 40 ------- 1 2.0 1.0 0 0
+ 0.026206 1 0 ack 40 ------- 1 1.0 2.0 0 1
- 0.026206 1 0 ack 40 ------- 1 1.0 2.0 0 1
r 0.046663 1 0 ack 40 ------- 1 1.0 2.0 0 1
+ 0.046663 0 2 ack 40 ------- 1 1.0 2.0 0 1
- 0.046663 0 2 ack 40 ------- 1 1.0 2.0 0 1
r 0.047695 0 2 ack 40 ------- 1 1.0 2.0 0 1
+ 0.047695 2 0 tcp 592 ------- 1 2.0 1.0 1 2
- 0.047695 2 0 tcp 592 ------- 1 2.0 1.0 1 2
+ 0.047695 2 0 tcp 592 ------- 1 2.0 1.0 2 3
- 0.048169 2 0 tcp 592 ------- 1 2.0 1.0 2 3
r 0.049169 2 0 tcp 592 ------- 1 2.0 1.0 1 2
+ 0.049169 0 1 tcp 592 ------- 1 2.0 1.0 1 2
- 0.049169 0 1 tcp 592 ------- 1 2.0 1.0 1 2
r 0.049643 2 0 tcp 592 ------- 1 2.0 1.0 2 3
+ 0.049643 0 1 tcp 592 ------- 1 2.0 1.0 2 3
- 0.055935 0 1 tcp 592 ------- 1 2.0 1.0 2 3
r 0.075935 0 1 tcp 592 ------- 1 2.0 1.0 1 2
+ 0.075935 1 0 ack 40 ------- 1 1.0 2.0 1 4
- 0.075935 1 0 ack 40 ------- 1 1.0 2.0 1 4
r 0.0827 0 1 tcp 592 ------- 1 2.0 1.0 2 3
+ 0.0827 1 0 ack 40 ------- 1 1.0 2.0 2 5


In the cwnd_ trace file, type = CWND isn't too hard figure out:  that is 
the size of the window at that time.  But what is RTT and how is it 
calculated?  Is it simply for that one packet?  Does it actually 
calculate the return ACK to the sender as part of the RTT (which is what 
we would like, I suppose)?

And why the drastic difference in the time fields?  What units is the 
'cwnd_' time field in?  It doesn't seem to match up too closely with the 
packets from the full trace file.

Here's a clip from my TCL file.  (This script uses FOR loops to assign 
multiple/variable numbers of sources.)


#TCP sources
for {set j 1} {$j<=$NumbSrc} {incr j} {
     set tcp_src($j) [new Agent/TCP/Reno];
     $tcp_src($j) set window_ 8000;

     # tracing TCP rtt variables
         set rtt_trace [open "rtt_trace.out" w];    # trace file
         $tcp_src($j) attach $rtt_trace;            # attach to TCP Agent
         $tcp_src($j) tracevar rtt_;                    # trace rtt

     #END Justin's RTT tracing

     # tracing TCP congestion window variables
         set cwnd_trace [open "cwnd_trace.out" w];    # trace file
         $tcp_src($j) attach $cwnd_trace;            # attach to TCP Agent
         $tcp_src($j) tracevar cwnd_;                    # trace rtt

     #END Justin's cong. window tracing

}

Any advice would be appreciated.

--  Justin


Reply via email to