[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] ns-2 and trace files
I see you are using the starwars file in your script:
set tfile [new Tracefile]
$tfile filename starwars.nsformat
Is this file the actual original file or the one after your do packetization
and ascii to binary conversion using the scripts in the web page ?
Haitham
----Original Message Follows----
From: Andrea Josi <[email protected]>
To: kunchanl <[email protected]>
CC: [email protected]
Subject: Re: [ns] ns-2 and trace files
Date: Fri, 3 Aug 2001 18:36:31 +0200 (CEST)
Thanks for your hints:
as i am actually using the latest tclcl version, i
have used a different binary trace file, Lee Breslau's
Star Wars trace file;
(http://www.research.att.com/~breslau/vint/trace.html)
I am not getting segmentation fault anymore, anyway,
the simulation stops after the first packet is
received:
could it be i have set wrong time instants ?
how should i set them then ?
Thanks again.
Here is the resulting trace file:
-------------------------------------------------------
+ 1 4 0 udp 17 ------- 0 4.0 1.0 0 0
- 1 4 0 udp 17 ------- 0 4.0 1.0 0 0
r 1.005014 4 0 udp 17 ------- 0 4.0 1.0 0 0
+ 1.005014 0 1 udp 17 ------- 0 4.0 1.0 0 0
- 1.005014 0 1 udp 17 ------- 0 4.0 1.0 0 0
r 1.015104 0 1 udp 17 ------- 0 4.0 1.0 0 0
-------------------------------------------------------
And here is the script...
------------------------------------------------------
set ns [new Simulator]
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
set n5 [$ns node]
set f [open aj/star.tr w]
$ns trace-all $f
set nf [open aj/star.nam w]
$ns namtrace-all $nf
$ns duplex-link $n0 $n1 1.5Mb 10ms DropTail
$ns duplex-link $n0 $n2 10Mb 5ms DropTail
$ns duplex-link $n0 $n3 10Mb 5ms DropTail
$ns duplex-link $n0 $n4 10Mb 5ms DropTail
$ns duplex-link $n0 $n5 10Mb 5ms DropTail
set tfile [new Tracefile]
$tfile filename starwars.nsformat
set s4 [new Agent/UDP]
$ns attach-agent $n4 $s4
set null1 [new Agent/Null]
$ns attach-agent $n1 $null1
$ns connect $s4 $null1
set trace [new Application/Traffic/Trace]
$trace attach-tracefile $tfile
$trace attach-agent $s4
$ns at 1.0 "$trace start"
$ns at 110.0 "$trace stop"
$ns at 120.0 "finish"
proc finish {} {
global ns nf f
$ns flush-trace
close $f
close $nf
exec nam aj/star.nam &
exit 0
}
$ns run
-------------------------------------------------------
--- kunchanl <[email protected]> ha scritto: >
look like your binary trace file is somehow
> corrupted.
> by the way,
> what tclcl version you're using? You might want to
> update it to the current one (i.e. b11) if it's not.
>
> Kun-chan Lan
>
> On Fri, 3 Aug 2001, [iso-8859-1] Andrea Josi wrote:
>
> > Hi,
> >
> > i am encountering similar problems: actually i get
> > segmentation fault when i run tcl/ex/tg.tcl, where
> > "example-trace" is used (i am using ns-2.1b8);
> > this is the error that is dumped:
> >
> > -------------------------------------------------
> >
> > warning: no class variable Tracefile::debug_
> >
> > see tcl-object.tcl in tclcl for info about
> > this warning.
> >
> > warning: no class variable Tracefile::debug_
> >
> > see tcl-object.tcl in tclcl for info about
> > this warning.
> >
> > could not stat example-trace
> > Segmentation fault (core dumped)
> >
> >
> ----------------------------------------------------
> >
> > What is the right way to use "example-trace" then
> ?
> >
> > Thanks very much.
> >
> >
> >
> > --- kunchanl <[email protected]> ha
> scritto: >
> > you might want to first use the included binary
> file
> > > "example-trace" in ~ns/tcl/ex
> > > to verify wehther the problem coming from your
> > > binary
> > > file or tcl script.
> > >
> > > Kun-chan Lan
> > >
> > > On Fri, 3 Aug 2001, Haitham Tayyar wrote:
> > >
> > > > Hi,
> > > >
> > > > I am running ns-2.1b8 on linux redhat 7.0. I
> > > already checked the mailing
> > > > list archive and tried every suggested way to
> get
> > > ns-2 to use a traffic
> > > > trace file.
> > > >
> > > > I am converting a file with two
> > > columns:interarrival-time(msec) and packet
> > > > size(bytes), to a binary file using the file
> > > "asctobin.c" mentioned in the
> > > > mailing list and attatched below. I get a
> binart
> > > file which when i
> > > > incorporate into my scripts using a script
> like:
> > > >
> > > > set tfile [new Tracefile]
> > > > $tfile filename trace.binary
> > > >
> > > > set t1 [new Application/Traffic/Trace]
> > > > $t1 attach-tracefile $tfile
> > > >
> > > > i get a segmentation fault.
> > > >
> > > > please advise,
> > > >
> > > > Haitham Tayyar
> > > > PhD student, University of British Columbia,
> > > Canada
> > > >
> > > >
> > > >
> > > >
> > >
> >
>
_________________________________________________________________
> > > > Get your FREE download of MSN Explorer at
> > > http://explorer.msn.com/intl.asp
> > > >
> > >
> >
> >
>
______________________________________________________________________
> > Do You Yahoo!?
> > Il tuo indirizzo gratis e per sempre @yahoo.it su
> http://mail.yahoo.it
> >
>
______________________________________________________________________
Do You Yahoo!?
Il tuo indirizzo gratis e per sempre @yahoo.it su http://mail.yahoo.it
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp