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

Re: [ns] regarding trace file generated by flowmonitor



Thanx for ur reply.

following is the program for which that trace file was
generated. Iam trying to trace the changing congestion
window parameter.I need to calculate the throughput
and delay on-a-per flow basis. how do I calculate it?
also after refering to the manual i understood that
following are what the fields represent.Iam unable to
explain it properly.If you still are not clear just
tell me so that i can write to you again.

currenttime addr port daddr dport v->name value
1.06644  1  0  4  0  cwnd_ 2.000 
 1.13288  1  0  4  0  cwnd_ 3.000 
 
 
#Create a simulator object
set ns [new Simulator]

#Define different colors for data flows (for NAM)
$ns color 1 Blue
$ns color 2 Red
 

#Open the NAM trace file
set nf [open out.nam w]
$ns namtrace-all $nf

#Open the Trace file
set tf [open out.tr w]
$ns trace-all $tf


#Define a 'finish' procedure
proc finish {} {
        global ns nf tf
        $ns flush-trace
        #Close the NAM trace file
        close $nf
        #Close the Trace file
        close $tf
        #Execute NAM on the trace file
        exec nam out.nam &
        exit 0
}

proc flowdump {interval} {
        global ns fmon fm

        $fmon dump
        flush $fm
        foreach f [$fmon flows] {

              set flow_arrs [$f set barrivals_]
              set flow_deps [$f set bdepartures_]
              set flow_drops [$f set bdrops_] 
                
                $f reset
        }
        $fmon reset
    $ns at [expr [$ns now] + $interval] "flowdump
$interval"
}



#Create four nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
 


#Create links between the nodes
$ns duplex-link $n0 $n2 2Mb 10ms DropTail
$ns duplex-link $n1 $n2 2Mb 10ms DropTail
$ns duplex-link $n2 $n3 1.7Mb 20ms RED
$ns duplex-link $n2 $n4 1.7Mb 20ms DropTail
 
#Give node position (for NAM)
$ns duplex-link-op $n0 $n2 orient right-down
$ns duplex-link-op $n1 $n2 orient right-up 
 
$ns duplex-link-op $n2 $n3 orient right-down 
$ns duplex-link-op $n2 $n4 orient right-up
 
#flow monitor 
set fm [open all.fm w]
set fmon [$ns makeflowmon Fid ]
$ns attach-fmon [$ns link $n0 $n2 ]  $fmon    
$ns attach-fmon [$ns link $n1 $n2]  $fmon    
$ns attach-fmon [$ns link $n2 $n3]  $fmon  
$ns attach-fmon [$ns link $n2 $n4]  $fmon  
$fmon attach $fm


#Setup a TCP connection
set tcp [new Agent/TCP]
$tcp set class_ 2
$tcp trace cwnd_
$tcp attach [open siri.tr w]
$ns attach-agent $n0 $tcp
set sink [new Agent/TCPSink]
$tcp set fid_ 1
$sink set fid_ 1
$ns attach-agent $n3 $sink
$ns connect $tcp $sink
$sink set interval_ 100
$tcp set window_ 10
$tcp set packetSize_ 500
 
 

set tcp1 [new Agent/TCP]
$tcp1 set class_ 1
$ns attach-agent $n1 $tcp1
set sink1 [new Agent/TCPSink]
$sink1 set fid_ 2
$ns attach-agent $n4 $sink1
$ns connect $tcp1 $sink1
$tcp1 set fid_ 2
$tcp1 trace cwnd_
$tcp1 attach [open siri.tr w]
$sink1 set interval_ 10
$tcp1 set window_ 1000
$tcp1 set packetSize_ 700
 


 
#Setup a Telnet over TCP connection

set telnet [new Application/FTP]
$telnet attach-agent $tcp
$telnet set type_ TELNET
$telnet set interval_ 100

set telnet0 [new Application/FTP]
$telnet0 attach-agent $tcp1
$telnet0 set type_ TELNET
$telnet0 set interval_ 100

 
 
#Schedule events for the Telnet objects
$ns at 0.1 "$telnet start"
$ns at 1.0 "$telnet0 start"
$ns at 3.0 "$telnet0 stop"
$ns at 4.5 "$telnet stop"
 
$ns at 0.0 "flowdump 0.5"
#Call the finish procedure after 5 seconds of
simulation time
$ns at 5.0 "finish"

 #Run the simulation
$ns run




--- Brian Lee Bowers <[email protected]> wrote:
> On Tuesday 07 August 2001 12:48, swetha swetha
> wrote:
> > hi all
> >
> > Thanx kunchan Lan for replying to my mail.
> >
> > can u or some one please help me understand what
> each
> > field  in the trace file represents. This is
> generated
> > by the use of flowmonitor. It would be greatful if
> you
> > could even give me the references as to where I
> can
> > find the notes  related to it.
> >
> >  5.000 1 0 0 1 0 3 1312 656000 0 0 2368 1395200 0
> 0 68
> > 47600 0 0
> >
> > 5.000 2 0 0 2 1 4 1056 739200 0 0 2368 1395200 0 0
> 68
> > 47600 68 47600
> 
> ns Manual, Chapter 22, Section 22.7.
> 
> > I also have the problem in understanding the trace
> > file in which i was trying to trace the congestion
> > window parameter.
> > 1.06644  1  0  4  0  cwnd_ 2.000
> > 1.13288  1  0  4  0  cwnd_ 3.000
> > 1.13618  1  0  4  0  cwnd_ 4.000
> > 1.19933  1  0  4  0  cwnd_ 5.000
> > 1.20262  1  0  4  0  cwnd_ 6.000
> > 1.20592  1  0  4  0  cwnd_ 7.000
> > 1.20921  1  0  4  0  cwnd_ 8.000
> > 1.26577  1  0  4  0  cwnd_ 9.000
> > 1.26906  1  0  4  0  cwnd_ 10.000
> > 1.27236  1  0  4  0  cwnd_ 11.000
> > 1.27565  1  0  4  0  cwnd_ 12.000
> > 1.27895  1  0  4  0  cwnd_ 13.000
> > 1.28224  1  0  4  0  cwnd_ 14.000
> > 1.28553  1  0  4  0  cwnd_ 15.000
> > 1.28883  1  0  4  0  cwnd_ 16.000
> > 1.33221  1  0  4  0  cwnd_ 17.000
> > 1.33551  1  0  4  0  cwnd_ 18.000
> > 1.33880  1  0  4  0  cwnd_ 19.000
> > 1.34209  1  0  4  0  cwnd_ 20.000
> > 1.34539  1  0  4  0  cwnd_ 21.000
> > 1.34868  1  0  4  0  cwnd_ 22.000
> 
> Looks like a time, some additional parameters
> (you'll have to tell me 
> what the 1 0 4 0 stands for) and a congestion
> window.  The congestion 
> window is following a classic slow start increase,
> increasing by 1 
> each time an ACK is received.  Looks like you have a
> link delay of 
> roughly 66 ms (1.13288 - 1.06644 ==> .06644).
> 
> What more do you want to know?  What are you
> printing out here in 
> your trace?  Just saying "I don't understand my
> trace" is not a real 
> question - tell us what you don't understand about
> your trace.
> 
> -- 
> Brian Lee Bowers	|	RADIANT Team (Summer Intern)
> [email protected]	|	Los Alamos National Laboratory
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/