[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: flow monitor
> Hi,
>
> Thanks for the reply.
>
> Could you roughly explain what these lines meant,
>
> set flow_stat10 [open flow.stat10 w]
opening a file that the tcl_channel later on uses to dump the data.
> set flowmon_10[$ns makeflowmon Fid]
setting a flowmonitor. makeflowmon is a procedure that does this. It has the
argument Fid indicating that it distinguishes the flows usign Fid.
> $ns attach-fmon [$ns duplex-link $n1 $n2 1.5Mb 10ms DropTail] $flowmon_10 0
Ataaching the flow_monitor to the link I'm interested in.
> set_flowMonitor $flowmon_10 $flow_stat10
Attaching the flowmonitor to the appropriate file handle.
> $ns at 5.0 "$flowmon_10 dump"
Time at which the statistics of the flow_monitor are written to the output file.
So you could repeat it at regular intervals or times when you are interested.
------
so, the procedure is very striaght forward.
1) You instantiate a flow monitor
2) Set it up on the required link.
3) Create a output file.
4) attach the file-handle the flow monitor
5) specify the interval at which you want to obtain your statistics.
>
> why is flow_stat10?
It could be anything really. This is the syntax we use that tells us the
statistics belong to flow_monitor set up on the link connecting node 1 and node
0.
> I run my script with these lines, it give error mesgs as the following,
>
> can't read "flow_stat10file5": no such variable
should be a very basic syntax error. Take a careful look at the routines in
ns-test scripts and I'm sure you would be able to spot it.
good luck
kedar
------------- End Forwarded Message -------------