[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hi,
>
> From: Biaz Saad <[email protected]>
> To: [email protected]
> cc: [email protected]
> Subject: Re: hi,
> Date: Fri, 16 Jan 1998 10:56:12 CST
>
> Hi xianghong,
>
> Unfortunately, I did not receive any hint on how to monitor the
> window size. I still do not know how to this through ns.
> You can use the tcpdump function (see test-suite demos). But this
> will completely slow down your simulation. Otherwise, you can infer
> approximatively the window size from the trace files. This can be done
> only if you use the agent FullTCP.
> An other solution would be to modify the tcp agent to dump the
> data you want.
> I hope that this will help you.
> Saad.
>
There is another way that should work. You will note that
the cwnd_ variable in tcp is of type "TracedDouble". This means
you should be able to do something of the following form:
set chan [open xxx.tr w]
..
$tcpagent attach $chan
$tcpagent trace cwnd_
This will produce a trace file called xxx.tr containing lines
of the following form:
...
9.20576 0 0 3 0 cwnd_ 6.263
9.21576 0 0 3 0 cwnd_ 6.423
9.30576 0 0 3 0 cwnd_ 6.579
9.31576 0 0 3 0 cwnd_ 6.731
9.32576 0 0 3 0 cwnd_ 6.879
9.33576 0 0 3 0 cwnd_ 7.025
9.34576 0 0 3 0 cwnd_ 7.167
9.35576 0 0 3 0 cwnd_ 7.306
...
A line is written each time the variable is changed. See the
code in tcp.cc (traceVar()) for more info.
- K