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

Re: how to use xgraph for packet no. Vs time



Hi Imad AAD,

Thanks for ur reply. However, what typr of Agent is sink in ur code.

My problem is: 

I need to check TCP packets for a particular flow & if I use  a
LossMonitor, TCPSink at the sender does not work & I get no throughput..

Please advice me on this.

thanks

bye

rajesh

On Thu, 22 Jul 1999, Imad AAD wrote:

> Rajesh Khetan wrote:
> 
> > Hi,
> >
> > I would really appreciate if somebody could tell me how to use xGraph for
> > packet No. Vs time Plotting.
> >
> > Thank you very much
> >
> > rajesh
> >
> 
> In your .tcl file do this:
> 
> proc record {} {
>     global sink f0
>     set ns2 [Simulator instance]
>     set time 0.01
>     set bytrec [expr [$sink set bytes_]/1000]
>     set now [$ns2 now]
>     puts $f0 "$now $bytrec"
>     $sink set bytes_ 0
>     $ns2 at [expr $now+$time] "record"
> }
> 
> then run xgraph with the file represented by $f0
> 
> Good luck
> 
> 

--------------------------------------------------------------------------
Rajesh Khetan
University of Southern California
1194 W 30th Street, Apt.# 1
LA, CA - 90007                      	Tel : (323) 737 3035
--------------------------------------------------------------------------