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

Re: Flow Monitor Problems



Hi,
	It's  a simple syntax error. For TCL to interpret the variable you would 
have to use $variable. So, if you use $flowmon_10 dump it should work.
	
	kedar


> From [email protected] Wed Sep  2 06:41:48 1998
> Date: Wed, 2 Sep 1998 15:31:09 +0100
> From: [email protected] (Harlisya Harun)
> To: [email protected]
> Subject: Flow Monitor Problems
> 
> Hi kedar,
> 
> 	My flow monitor does not work.  I got this error 
> messages while running my simulation script:
> 
> ns: flowmon_10 dump: invalid command name "flowmon_10"
>     while executing
> "flowmon_10 dump"
> 
> Below, is part of my scripts that concentrate on
> flow monitor.
> 
> Regards,
> harlisya
> 
> ***********************************************************
> set ns [new Simulator]
> set n0 [$ns node]
> set r1 [$ns node]
> set r2 [$ns node]
> set n1 [$ns node]
> 
> set f [open out.tr w]
> $ns trace-all $f
> set flow_stat [open flow.stat w]
> set flowmon_10 [$ns makeflowmon Fid]
> 
> proc set_flowMonitor {flowmon output_lisya} {
> 	$flowmon attach $output_lisya
> 	set bytesInt_ [new Integrator]
> 	set pktsInt_ [new Integrator]
> 	$flowmon set-bytes-integrator $bytesInt_
> 	$flowmon set-pkts-integrator $pktsInt_
> 	return $flowmon
> }
> 
> $ns make-lan "$n0 $r1" 10Mb 1ms LL Queue/DropTail Mac/Csma/Cd 
> $ns simplex-link $r1 $r2 512kb 304ms DropTail
> $ns simplex-link $r2 $r1 9.6kb 304ms DropTail
> $ns attach-fmon [$ns link $r1 $r2] $flowmon_10 0
> $ns make-lan "$r2 $n1" 10Mb 1ms LL Queue/DropTail Mac/Csma/Cd
> 
> set_flowMonitor $flowmon_10 $flow_stat
> 
> $ns at 50 "flowmon_10 dump"
> $ns at $stop "finish file"
> 
> $ns run
> 
> ***************************************************************