[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] Average queue lenght...
Hi!
I have a doubt that I do not know how to solve. I am trying to get the
average queue length in a link and I though that I could do it using a queue
monitor like this:
set qmon [$ns monitor-queue $router0 $router1 ""]
$qmon reset
and just dumping the value of sum_ in the packets integrator each interval of
measurement... like this:
//begin of the loop
set byte_integ [$qmon get-bytes-integrator]
set pkt_integ [$qmon get-pkts-integrator]
puts "Queue_size= [$pkt_integ set sum_]"
$qmon reset
//loop again after the defined interval...
But it turns out that I am getting values of the queue of 30 packets when my
link has a queue of only ten packets!! I have checked that the value of qlim_
is ten packets and they are discarded when the queue is over that value, so,
what I am doing wrong? First I thought that sum_ should be the sum of every
instantaneous value of the queue in the measuring interval... but with such a
low value (30~40) in a whole second interval... that sounds weird!!! How can I
compute the average of the queue length over my interval?
Thanks in advance!!
/Nacho
--
Ignacio M�s Ivars
Department of Teleinformatics - Royal Institute of Technology (KTH/IT)
Electrum, 204 S-164 40 KISTA (Sweden)
Office phone: +46 8 7521497
Office fax: +46 8 7511793
E-mail: [email protected]
http://www.it.kth.se/~nacho/