[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] Problem with queue size
Dear ns users, Hello.
I tried to get the size of the queue in a link using the proc below
and although I could see the packets piling up and even dropping the
output of the queue size was 0 at all time. Can you please help?
Thanks alot.
proc record {} {
global ns n mf
#Set the time after which the procedure should be called again
set time 0.002
#Get the size of the queue of each link
set q [$ns monitor-queue $n(1) $n(2) ""]
set q12 [$q set size_]
puts $q12
#Get the current time
set now [$ns now]
#Write to the file
puts $mf "$now $q12"
#Re-schefule the procedure
$ns at [expr $now + $time] "record"
}
Hassan.