NS2 Nam and Trace Files are always empty
Hi everybody,
I need help! I wrote a script in which, a mobile node across the umts, the WIMAX and the WIFI coverage to test the vertical handover . But the out.nam file and the trace one are always empty, the script is correct there is no errors !!!! please help |
Depends what you have written in the file.
? Are you sure that the finishing lines are : $ns at 5.0 "finish" $ns run http://www.isi.edu/nsnam/ns/tutorial...s/template.tcl http://www.isi.edu/nsnam/ns/tutorial.../example1a.tcl http://www.isi.edu/nsnam/ns/tutorial/nsscript1.html Suggest : Attach the file in question : Use the paper-clip tool in the 'Advanced Editor', and attach the file as name.tcl.txt . . |
I already verify it, my tcl code is complete !!!
this is the code, I couldn't attach the file I have always a Invalid File Error Code:
#check input parameters |
Don't know which patching you have done with ns-2.xx (Unknown version.)
So I have no chance testing your file. But : Please read 25 random simulation examples.tcl : They all end with $ ns run Quote:
. |
Sorry for the late, my NS version is 2.29 with ns2_NIST_mobility.patch
I already add "$ns run" in my piratical simulation here is the error message Quote:
|
problems with input data- trace file
hello
i download tcl script for wireless manet simulatioin ; it works fine for aodv, dsr and dsdv but whe using for tora - nam file is created but when i run $xgraph tora1.tr it gives me error ________________ problems with input data *********** N.venkatadri Research Scholar, Department of Computer Science V.S.University please help me .. |
knudfl
hello knudfl,
i download tcl script for 3 nodes , i works fine for AODV, DSR and DSDV interms of nam file and trace file . but when running the same script for TORA , it is simulated but when i run xgraph command at prompt as $xgraph win.tr {where win.tr is a trace file for tora.tcl} problems with input dta please help me regards ********** N.Venkatadri Research Scholar |
Post # 5 : You are no supposed to change the extension from tcl to txt.
But to add .txt to file.tcl, so it's easy to actually see, that it is a .tcl file. Like file.tcl.txt . Post # 6 : Please show a direct download link to the file. Or upload it to Google Docs / Google Drive. Post # 7 : As for #6. I.e. the code must be known for anybody to answer. Not easy to answer about unknown code. ( We cannot guess what's in those files.) . |
knudfl
hai knudfl
here i attach a link ( this was sent by u) , this code works fine for DSDV, AODV, and DSR that means it gives both .nam and .tr files but when i use this same script for tora , it creates 1_out.nam and 1_out.tr ; $nam 1_out.nam works fine but $xgraph 1_out.tr cannot give graph ; it displays "problems with input data" http://ipsit.bu.edu/sc546/sc546Fall2...files/tora.tcl please help me **************** N.Venkatadri |
hai knudfl,
please respond ,iam eagerly waiting for u, i would like to simulate MANET routing protocols ; i run DSDV, AODV and DSR successfully but not TORA. u sent me a tora.tcl link it gives successful nam but not trace file. with only trace file we can produce graphs. please give me a successful tora.tcl file that must give nam file and trace file . please ,please respond regards *********** N.Venkatadri |
hello knudfl
here i attach a tora tcl script , it gives nice simulation , but for this tcl script trace file is empty. that is my problem... please check this and provide me a successful tora tcl script that gives trace file for producing graphs thank u ******* N.Venkatadri ---------- Post added 10-13-12 at 11:56 PM ---------- hello knudfl here i attach a tora tcl script , it gives nice simulation , but for this tcl script trace file is empty. that is my problem... # TORA Manet routing protocol simulation #Define options #================================= Set val(chan) Channel/WirelessChannel ;#channel type Set val(prop) Propogation/TwoRayGround;#radio-propogation model Set val(ant) Antenna/OminiAntenna ;#Antenna type Set val(ll) LL ;#link layer type Set val(ifq) Queue/DropTail/PriQueue ;#interface queue type Set val(ifqlen) 50 ; #max packet in ifq Set val(netif) Phy/WirelessPhy ;#network interface type Set val(mac) Mac/802_11 ;#MAC type Set val(nn) 6 ;#number of nodes Set val(rp) TORA ;#routing protocol Set val(x) 800 Set val(y) 800 Set ns [new Simulator] #ns-random 0 Set f [open 1_out.tr w] $ns trace-all $f Set namtrace [open 1_out.nam w] $ns namtrace-all-wireless $namtrace $val(x) $val(y) Set f0 [open proj_out0.tr w] Set f1 [open proj_out1.tr w] Set f2 [open proj_out2.tr w] Set f3 [open proj_out3.tr w] Set topo [new Topography] $topo load_flatgrid 800 800 Create-god $val(nn) Set chan_1 [new $val(chan)] Set chan_2 [new $val(chan)] Set chan_3 [new $val(chan)] Set chan_4 [new $val(chan)] Set chan_5 [new $val(chan)] Set chan_6 [new $val(chan)] #Configure and create nodes $ns node-config -adhocRouting $val(rp) \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ #-channelType $val(chan) \ -topoInstance $topo \ -agentTrace OFF \ -routerTrace ON \ -macTrace ON \ -movementTrace OFF \ -channel $chan_1 # \ #-channel $chan_2 \ #-channel $chan_3 \ #-channel $chan_4 \ #-channel $chan_5 \ #-channel $chan_6 proc finish {} { global ns f f0 f1 f2 f3 namtrace $ns flush-trace close $namtrace close $f0 close $f1 close $f2 close $f3 # exec xgraph proj_out0.tr proj_out1.tr # proj_out2.tr proj_out3.tr exec nam -r 5m 1_out.nam & exit 0 } proc record {} { global sink0 sink1 sink2 sink3 sink4 sink5 f0 f1 f2 f3 #Get An Instance Of The Simulator set ns [Simulator instance] #Set The Time After Which The Procedure Should Be Called Again set time 0.05 #How Many Bytes Have Been Received By The Traffic Sinks? set bw0 [$sink5 set npkts_] set bw1 [$sink5 set nlost_] #set bw2 [$sink2 set npkts_] #set bw3 [$sink3 set npkts_] #Get The Current Time set now [$ns now] #Save Data To The Files puts $f0 "$now [expr $bw0]" puts $f1 "$now [expr $bw1]" #puts $f2 "$now [expr $bw2]" #puts $f3 "$now [expr $bw3]" #Re-Schedule The Procedure $ns at [expr $now+$time] "record" } # define color index $ns color 0 blue $ns color 1 red $ns color 2 chocolate $ns color 3 red $ns color 4 brown $ns color 5 tan $ns color 6 gold $ns color 7 black set n(0) [$ns node] #$ns at 0.0 "$n(0) color red" $n(0) color "0" $n(0) shape "circle" set n(1) [$ns node] $n(1) color "blue" $n(1) shape "circle" set n(2) [$ns node] $n(2) color "tan" $n(2) shape "circle" set n(3) [$ns node] $n(3) color "red" $n(3) shape "circle" set n(4) [$ns node] $n(4) color "tan" $n(4) shape "circle" set n(5) [$ns node] $n(5) color "red" $n(5) shape "circle" for {set i 0} {$i < $val(nn)} {incr i} { $ns initial_node_pos $n($i) 30+i*100 } $n(0) set X_ 0.0 $n(0) set Y_ 0.0 $n(0) set Z_ 0.0 $n(1) set X_ 0.0 $n(1) set Y_ 0.0 $n(1) set Z_ 0.0 $n(2) set X_ 0.0 $n(2) set Y_ 0.0 $n(2) set Z_ 0.0 $n(3) set X_ 0.0 $n(3) set Y_ 0.0 $n(3) set Z_ 0.0 $n(4) set X_ 0.0 $n(4) set Y_ 0.0 $n(4) set Z_ 0.0 $n(5) set X_ 0.0 $n(5) set Y_ 0.0 $n(5) set Z_ 0.0 $ns at 0.0 "$n(0) setdest 100.0 100.0 3000.0" $ns at 0.0 "$n(1) setdest 200.0 200.0 3000.0" $ns at 0.0 "$n(2) setdest 300.0 200.0 3000.0" $ns at 0.0 "$n(3) setdest 400.0 300.0 3000.0" $ns at 0.0 "$n(4) setdest 500.0 300.0 3000.0" $ns at 0.0 "$n(5) setdest 600.0 400.0 3000.0" $ns at 2.0 "$n(5) setdest 100.0 400.0 500.0" #$ns at 1.5 "$n(3) setdest 450.0 150.0 500.0" # CONFIGURE AND SET UP A FLOW set sink0 [new Agent/LossMonitor] set sink1 [new Agent/LossMonitor] set sink2 [new Agent/LossMonitor] set sink3 [new Agent/LossMonitor] set sink4 [new Agent/LossMonitor] set sink5 [new Agent/LossMonitor] $ns attach-agent $n(0) $sink0 $ns attach-agent $n(1) $sink1 $ns attach-agent $n(2) $sink2 $ns attach-agent $n(3) $sink3 $ns attach-agent $n(4) $sink4 $ns attach-agent $n(5) $sink5 #$ns attach-agent $sink2 $sink3 set tcp0 [new Agent/TCP] $ns attach-agent $n(0) $tcp0 set tcp1 [new Agent/TCP] $ns attach-agent $n(1) $tcp1 set tcp2 [new Agent/TCP] $ns attach-agent $n(2) $tcp2 set tcp3 [new Agent/TCP] $ns attach-agent $n(3) $tcp3 set tcp4 [new Agent/TCP] $ns attach-agent $n(4) $tcp4 set tcp5 [new Agent/TCP] $ns attach-agent $n(5) $tcp5 proc attach-CBR-traffic { node sink size interval } { #Get an instance of the simulator set ns [Simulator instance] #Create a CBR agent and attach it to the node set cbr [new Agent/CBR] $ns attach-agent $node $cbr $cbr set packetSize_ $size $cbr set interval_ $interval #Attach CBR source to sink; $ns connect $cbr $sink return $cbr } set cbr0 [attach-CBR-traffic $n(0) $sink5 1000 .015] #set cbr1 [attach-CBR-traffic $n(1) $sink2 1000 .015] #set cbr2 [attach-CBR-traffic $n(2) $sink3 1000 .015] #set cbr3 [attach-CBR-traffic $n(3) $sink0 1000 .015] #set cbr4 [attach-CBR-traffic $n(4) $sink3 1000 .015] #set cbr5 [attach-CBR-traffic $n(5) $sink0 1000 .015] $ns at 0.0 "record" #$ns at 0.5 "$cbr0 start" #$ns at 0.5 "$cbr2 start" #$ns at 2.0 "$cbr0 stop" #$ns at 2.0 "$cbr2 stop" $ns at 1.0 "$cbr0 start" #$ns at 4.0 "$cbr3 stop" $ns at 10.0 "finish" puts "Start of simulation.." $ns run please check this and provide me a successful tora tcl script that gives trace file for producing graphs thank u ******* N.Venkatadri |
# 10
http://ipsit.bu.edu/sc546/sc546Fall2...files/tora.tcl : I got the "ipsit tora.tcl" to work with no "eternal loop". And '1_out.tr' , 133 kB is created. In the tora patched ns-2.34. http://erl1.wordpress.com/2010/08/10...-ubuntu-10-04/ >>> " fix the line 504 (ns-2.34) in imep/imep.cc " Your code in post #11 : Some typos. Edit all 'Set' to set. Edit : Set val(prop) Propogation/TwoRayGround;#radio-propogation model To : set val(prop) Propogation/TwoRayGround ;#radio-propogation model Edit : Create-god $val(nn) to : create-god $val(nn) ? May be there are more typos ? Please edit post #11 to use "code tags", like the code in post #3. . |
hello knudfl
thank u so much for responding; i was made changes to tora.cc , tora.h and also imep.cc after make changes to these ; i recompile my ns-2.34 as $cd Deskto $Dessktop\cd ns-allinone-2.34 $$Dessktop\cd ns-allinone-2.34\cd ns-2.34 $$Dessktop\cd ns-allinone-2.34\ns-2.34$make clean ; it is ok $$$Dessktop\cd ns-allinone-2.34\ns-2.34$make ; after using make the following messages are displayed make[1]: entering directory '/home/venkat/Desktop/ns-allnone-2.34/ns-2.34/indep-utils/cmu-scen-gen/setdest' make[1]:nothing to be done for 'all'. make[1]:leaving directory 'home/venkat/Desktop/ns-allinone-2.34/ns-2.34/indep-utils/cmu-scen-gen/setdest' . . . make[1]:leaving directory 'home/venkat/Desktop/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/ucb' [venkat@localhost ns-2.34]$ what is the problem . after these steps i run tora.tcl, it enter infinite loop; may be the above statements are problem.. please help me thank u regards *********** N.Venkatadri |
# 13
Quote:
I.e. all ns-allnone-2.34/ns-2.34/indep-utils/** were created at the earlier ./install or make. " indep-utils/" are separate applications, and they are not "cleaned", when you do 'make clean'. Please edit post # 11 to use code tags : Write [/code] at code text end, and [code] at code start. Or use the # button in the Advanced Editor. . |
hai knudfl
thank u so much for ur reply.. :'nothing to be done for all' if it is OK means then why tora.tcl enters infinite loop and does not work? please help me ; tora is my research topic .. thank u regarding: **************** N.Venkatadri |
All times are GMT -5. The time now is 10:49 AM. |