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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

36.1.3 St<strong>at</strong>isticsEach agent tracks two sets of st<strong>at</strong>istics: st<strong>at</strong>istics to measure the respo<strong>ns</strong>e to d<strong>at</strong>a loss, <strong>and</strong> overall st<strong>at</strong>istics for each request/repair.In addition, there are methods to access other inform<strong>at</strong>ion from the agent.D<strong>at</strong>a Loss <strong>The</strong> st<strong>at</strong>istics to measure the respo<strong>ns</strong>e to d<strong>at</strong>a losses tracks the duplic<strong>at</strong>e requests (<strong>and</strong> repairs), <strong>and</strong> the averagerequest (<strong>and</strong> repair) delay. <strong>The</strong> algorithm used is documented in Floyd et al[11]. In this algorithm, each new request (orrepair) starts a new request (or repair) period. During the request (or repair) period, the agent measures the number of firstround duplic<strong>at</strong>e requests (or repairs) until the round termin<strong>at</strong>es either due to receiving a request (or repair), or due to the agentsending one. <strong>The</strong> following code illustr<strong>at</strong>es how the user can simple retrieve the current values in an agent:set st<strong>at</strong>sList [$srm array get st<strong>at</strong>istics_]array set st<strong>at</strong>sArray [$srm array get st<strong>at</strong>istics_]<strong>The</strong> first form retur<strong>ns</strong> a list of key-value pairs. <strong>The</strong> second form loads the list into the st<strong>at</strong>sArray for further manipul<strong>at</strong>ion.<strong>The</strong> keys of the array are dup-req, ave-dup-req, req-delay, ave-req-delay, dup-rep, ave-dup-rep,rep-delay, <strong>and</strong> ave-rep-delay.Overall St<strong>at</strong>istics In addition, each loss recovery <strong>and</strong> session object keeps track of times <strong>and</strong> st<strong>at</strong>istics. In particular, eachobject records its startTime, serviceTime, distance, as are relevant to th<strong>at</strong> object; startTime is the time th<strong>at</strong> thisobject was cre<strong>at</strong>ed, serviceTime is the time for this object to complete its task, <strong>and</strong> the distance is the one-way time to reachthe remote peer.For request objects, startTime is the time a packet loss is detected, serviceTime is the time to finally receive th<strong>at</strong> packet,<strong>and</strong> distance is the distance to the original sender of the packet. For repair objects, startTime is the time th<strong>at</strong> a request forretra<strong>ns</strong>mission is received, serviceTime is the time send a repair, <strong>and</strong> the distance is the distance to the original requester. Forboth types of objects, the serviceTime is normalized by the distance. For the session object, startTime is the time th<strong>at</strong> theagent joi<strong>ns</strong> the multicast group. serviceTime <strong>and</strong> distance are not relevant.Each object also maintai<strong>ns</strong> st<strong>at</strong>istics particular to th<strong>at</strong> type of object. Request objects track the number of duplic<strong>at</strong>e requests<strong>and</strong> repairs received, the number of requests sent, <strong>and</strong> the number of times this object had to backoff before finally receivingthe d<strong>at</strong>a. Repair objects track the number of duplic<strong>at</strong>e requests <strong>and</strong> repairs, as well as whether or not this object for this agentsent the repair. Session objects simply record the number of session messages sent.<strong>The</strong> values of the timers <strong>and</strong> the st<strong>at</strong>istics for each object are written to the log file every time an object completes the errorrecovery function it was tasked to do. <strong>The</strong> form<strong>at</strong> of this trace file is:where〈prefix〉 is〈id〉 is〈times〉 is〈st<strong>at</strong>s〉 is〈prefix〉 〈id〉 〈times〉 〈st<strong>at</strong>s〉〈time〉 n 〈node id〉 m 〈msg id〉 r 〈round〉〈msg id〉 is expressed as 〈source id:sequence number〉type 〈of object〉list of key-value pairs of startTime, serviceTime, distancelist of key-value pairs of per object st<strong>at</strong>isticsdupRQST, dupREPR, #sent, backofffor request objectsdupRQST, dupREPR, #sentfor repair objects#sentfor session objects<strong>The</strong> following sample output illustr<strong>at</strong>es the output file form<strong>at</strong> (the lines have been folded to fit on the page):311

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

Saved successfully!

Ooh no, something went wrong!