[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: QueueMonitor object
On Mon, 23 Nov 1998, hongyi chen wrote:
: Hi;
:
: I try to monitor a queue statistics, so I try to set up a queuemonitor
: object.
: I try to use
: " $ns queue-monitor $n0 $n1"
: statement to get a QueueMonitor object for the queue on link between n0
: and n1, but get a error message saying
: " no value given to parameter "qtrace" to "_o3"".
: On the manual, it says that this part is not verified to up to date.
: Do you know is that I did something wrong or something else?
to attach a queue-monitor object for a given link you can do the
following:
# open a trace file
set tFile [open queue.tr w]
# set up the queue-monitor
$ns monitor-queue $n0 $n1 $tFile {sampleInterval}
# sampleInterval is optional and defaults to 0.1 seconds
# start tracing using either
[$ns link $n0 $n1] start-tracing
# or
# [$ns link $n0 $n1] queue-sample-timeout
# which averages over the last sampleInterval
BTW: remember to close your trace file at the end of your simulation
(otherwise you are very likely to get falsified results (just like i
did))
chris
-----------------------------------------------------------------
Christof Brandauer [email protected]
Student of Applied Informatics
Department of Computer Science, University of Salzburg, Austria
-----------------------------------------------------------------