[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Need help on flowmonitors
Individual flows can be extracted using something similar to
foreach flow [$fmon flows] {
set flow_pkts [$flow set parrivals_]
.....
}
You can see ~ns/ns-2/tcl/rtmechanisms/rtm_reclass.tcl for examples.
> I tried to call the "fmon(0) dump" command during simulation, but this
> generates some error messages.
Did you attach a channel (file pointer) to the flowmon object before
calling dump?
-ratul
On Mon, 6 Nov 2000, Edmund Solberg [iso-8859-1] L�vlund wrote:
> How can I pick out measures for individual flows from a shared link with a
> a flow monitor?
>
> I have attached a flowmonitor "fmon(0)" to the link between "node0" and
> "node1":
>
> set fmon(0) [$ns makeflowmon Fid]
> $ns attach-fmon [$ns link $node0 $node1] $fmon(0) 0
> $fmon(0) attach $tracefile
>
> Let's say the stoptime for the simulation is 5.0 seconds:
> Commands like "$ns at 6.0 fmon(0) dump" works OK. I also managed to get
> measures like total numbers of bytes,
> packets (total number on the link, not from an individual flow) etc. during
> the simulation by using commands like:
>
> set tot_pkts [$fmon(0) set parrivals_]
>
> What I really want to do is to collect measures like "number of packets
> arrived" from just one of the flows at regular intervals during the
> simulation.
>
> There must be some way to get data from individual flows during simulation,
> but I haven't managed to figure it out by myself
> from the manual or the mailing list archives.
>
> Hope someone can help me on this problem. Example scripts would be much
> appreciated.
>
> Regards
> Edmund
>
>
>
>