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

Re: Tracing variables




> From daemon Tue Sep  8 03:35:26 1998
> >From [email protected]  Tue Sep  8 03:35:17 1998
> Date: Mon, 7 Sep 1998 19:15:28 -0700
> From: Chris  <[email protected]>
> To: [email protected]
> Subject: Tracing variables
> Cc: [email protected]
> 
> Hi,
> Can anyone tell me how to trace integer or float variables in my
> simulation using the script file.  I am using tcp.cc and notice 
> cwnd_, ssthresh_ etc. are TracedInt... how do I get these values
> to print out?
> 
> Are there options besides TracedInt and TracedDouble?
> 
> thanks very much!
> 
> --Chris
> 

Hi Chris,
	I am using tcl script... What I have done is using this command:

***************************************************************************
	proc tcpDump { tcpSrc interval } {
	global ns
	proc dump { src interval } {
		global ns
		$ns at [expr [$ns now] + $interval] "dump $src $interval"
		puts [$ns now]/cwnd=[format "%.4f" [$src set cwnd_]]/ssthresh=[$src set ssthresh_]/ack=[$src set ack_]
		}
	$ns at 0.0 "dump $tcpSrc $interval"
}
                                    
tcpDump $connection 1.0

****************************************************************************

The $connection is from the previous command "set connection [$ns connect $tcp $sink]".

Hope, it answers your question.


harlisya