12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GeneralSender i<strong>ns</strong>tproc trace-xcp parameters {$self i<strong>ns</strong>tvar tcp_ id_ tcpTrace_global ftracetcp$id_set ftracetcp$id_ [open xcp$id_.tr w]set tcpTrace_ [set ftracetcp$id_]$tcp_ <strong>at</strong>tach-trace [set ftracetcp$id_]if { -1 < [lsearch $parameters cwnd] } { $tcp_ tracevar cwnd_ }if { -1 < [lsearch $parameters seqno] } { $tcp_ tracevar t_seqno_ }}For tracing xcp queue it is required to <strong>at</strong>tach a file descriptor to the xcp queue.$xcpq <strong>at</strong>tach This is an example of how the trace <strong>at</strong> an xcp source looks like:0.00000 2 0 1 0 cwnd_ 1.0000.00000 2 0 1 0 t_seqno_ 00.079 x x x x throughput 0.10.07900 2 0 1 0 t_seqno_ 10.119064 x x x x reverse_feedback_ 00.119064 x x x x controlling_hop_ 00.119064 x x x x newcwnd 10.11906 2 0 1 0 cwnd_ 2.0000.119064 x x x x throughput 500000.11906 2 0 1 0 t_seqno_ 20.119064 x x x x throughput 500000.11906 2 0 1 0 t_seqno_ 3<strong>The</strong> first field gives the timestamp; the next 4 fields give the source id (node/port) <strong>and</strong> destin<strong>at</strong>ion id (node/port) for the xcpflow. <strong>The</strong> next field gives the name of the variable being traced followed by the value of the variable. Note th<strong>at</strong> variables likecwnd_, t_seqno_ are using variable tracing which is a function supported by the OTcl lib. While variables like throughput,reverse_feedback use the XCPAgent class function trace_var defined in xcp-end-sys.cc. For more on variable tracing in <strong>ns</strong>please read section 3.4.3 in the <strong>ns</strong> manual <strong>at</strong> http://www.isi.edu/<strong>ns</strong>nam/<strong>ns</strong>/doc/index.htmlAnd example of trace output <strong>at</strong> a xcp bottleneck router looks like below:Tq_ 0.0472859 0.025queue_bytes_ 0.0472859 0routerId_ 0.0472859 0pos_fbk 0.053544 0neg_fbk 0.053544 0delta_throughput 0.053544 0Thruput2 0.053544 60000pos_fbk 0.054024 0neg_fbk 0.054024 0delta_throughput 0.054024 0205

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!