[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: loss monitor



Hello Randa,

I ran your script and it turns out that the small difference between what 
QueueMonitor and LossMonitor reports is because three packets are on the link 
when the simulation terminates, something that Miten has also pointed out 
earlier before (see below).

Keep in mind that QueueMonitor monitors packet arrivals and departures from 
and to the buffer that is associated with the link. That is, when a packet is 
taken out of the buffer and put on the link, pdepartures_ is increased, though 
the packet is still in transit (and therefore not detected by the LossMonitor 
yet).

If you insert the following statement in your script:
$ns at 3.0 "$cbr0 stop"

and increase the simulation's end from 3.0 to 4.0:
$ns at 4.0 "finish"

then you get the proper result:

Link statistics for link n1->n2:
parrivals_=534, pdrops_=0, pdepartures_=534
barrivals_=112140, bdrops_=0, bdepartures_=112140
lossMonitor nlost: 0
lossMonitor nreceived: 534
lossMonitor expected: 534
lossMonitor last packet time: 3.00987000000001670
lossMonitor bytes: 112140


   Regards,
        -Chris.



>From Miten:
What was the delay between two nodes. It may be possible that before 
those last 3 packets were deivered to loss Monitor, your experiment ended 
because of the time specified by you in stop command. Those 3 packets 
were yet waiting for the scheduler to work on them for delivery to loss 
Monitor.

Hope this helps. (If I am wrong, some other person will correct me :-))

Miten.