Hi dear Hakki

The best way is to define a recursive procedure to be called every certain
period (for instance every 0.01 second) to put the Cwnd_ or RTT_ in a
pre-defined file.

To do so , let's say for monitoring Congestion Window of a certain flow
define this (the 5th line gets the value of Cwnd_ for $tcpsource connection
and the 6th line stores it in a file defined by $file previously as an
argument to plotWindow function) :

*proc plotWindow {tcpSource file} {
global ns
set time 0.01
set now [$ns now]
set cwnd [$tcpSource set cwnd_]
puts $file "$now $cwnd"
$ns at [expr $now+$time] "plotWindow $tcpSource $file"
}*

Now you run this function in your .tcl script once and it automatically gets
re-called every 0.01 second. for example :

*$ns at 0.2 "plotWindow $tcp1 $win1"
$ns at 0.2 "plotWindow $tcp2 $win2"
...
$ns at 50 "finish"
$ns run*


Best regards,
Naeem

On Mon, Feb 8, 2010 at 7:31 AM, hakki <[email protected]> wrote:

>
>
> Hi all,
>
> I want to monitor the average window size W(t) and RTT in TCP. However,
> even
> I can monitor queue, I can not monitor average window size and RTT.
>
> Thanks for all your help
>
> hakki
> --
> View this message in context:
> http://old.nabble.com/monitor-average-window-size-and-RTT-tp27493551p27493551.html
> Sent from the ns-users mailing list archive at Nabble.com.
>
>


-- 
Naeem Khademi
---------------------------------------------------------
Student of Master of Computer Science
University  Putra  Malaysia
---------------------------------------------------------

Reply via email to