[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Need help on flowmonitors



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.

I tried to call the "fmon(0) dump" command during simulation, but this 
generates some error messages.

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