On 9/22/19 7:24 AM, Shahrukh Khan Kasi wrote:
> When I change the connect time from 10 microseconds to 0.1 seconds, I
> still get the cwnd trace for the last node only.
Usually there are two possibilities for this:
1) the traced object doesn't exist for some reason
2) the trace exists but is not properly connected due to an incorrect
path specifier
In your case, you start with a working example
(tcp-variants-comparison.cc) so it is less likely to be 2).
To debug this, I probably would take steps such as the following (either
logging, described below, or similar steps using gdb):
1) find where in the code that this trace is triggered. In this case,
it is tcp-socket-base.cc:4140
void
TcpSocketBase::UpdateCwnd (uint32_t oldValue, uint32_t newValue)
{
m_cWndTrace (oldValue, newValue);
}
I notice that there isn't a log output on this method. Temporarily add one:
void
TcpSocketBase::UpdateCwnd (uint32_t oldValue, uint32_t newValue)
{
NS_LOG_DEBUG ("UpdateCwnd");
m_cWndTrace (oldValue, newValue);
}
rebuild and now run your program like this:
$ NS_LOG="TcpSocketBase" ./waf --run tcp-variants-comparison > log.out 2>&1
Because of the extra context information passed to the log output, you
will see lines in the log.out file like this:
+0.045288399s 2 [node 2] TcpSocketBase:UpdateCwnd(): [DEBUG] UpdateCwnd
+0.090576798s 1 [node 1] TcpSocketBase:UpdateCwnd(): [DEBUG] UpdateCwnd
Now, in your case, you expect to see nodes 0 through 3. Do you see
these UpdateCwnd calls for those nodes in your log trace? If so, you
probably have some problem in connecting to the trace, and I would
double check (again using the log) the times that these sockets are
being instantiated. If not, then the tracing hooks may be fine but your
program is not doing what you think it should be doing.
- Tom
> > an email to
ns-3-...@googlegroups.com <javascript:>
> > <mailto:
ns-3-users+...@googlegroups.com <javascript:>>.
> <
https://groups.google.com/d/msgid/ns-3-users/7c70e845-18f2-441d-bf7c-fa8f65818c73%40googlegroups.com?utm_medium=email&utm_source=footer
> <
https://groups.google.com/d/msgid/ns-3-users/7c70e845-18f2-441d-bf7c-fa8f65818c73%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> Posting to this group should follow these guidelines
>
https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
> ---
> You received this message because you are subscribed to the Google
> Groups "ns-3-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
ns-3-users+...@googlegroups.com
> <mailto:
ns-3-users+...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/ns-3-users/355cc801-5dea-41e7-9e72-d421f4c5b28d%40googlegroups.com
> <
https://groups.google.com/d/msgid/ns-3-users/355cc801-5dea-41e7-9e72-d421f4c5b28d%40googlegroups.com?utm_medium=email&utm_source=footer>.