LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-18-2012, 05:25 AM   #16
musemicang
LQ Newbie
 
Registered: May 2012
Posts: 11

Rep: Reputation: Disabled

# 15
I reinstalled ns-2.31 again, detailed steps:
1. tar -zxvf ns-allinone-2.31.tar.gz
2. cd ns-allinone-2.31
3. export CC=gcc-4.1 CXX=g++-4.1
4. ./install
then I follow your advice in the link:
http://www.linuxquestions.org/questi...rror-940388/#5
./ns test4maccon.tcl seems well, nam test.nam still appears "node i is not defined". However, when the topology script is changed into random.tcl, it nam well.
 
Old 09-01-2012, 06:00 PM   #17
Khaled ELmishad
LQ Newbie
 
Registered: May 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Solutions

Concerning the node not defined problem:
1st define your nodes positions (x,y,z) coordinates 2nd Define node size. By that you'll be able to view them in nam without errors

Concerning the add-channel problem generated from start simulation button in CRCN GIU:
Just create your traffic,topo and other parameters and after that use your terminal to compile by ./ns yourfile.tcl , however I prefer not using that GUI.
 
Old 03-11-2013, 12:52 AM   #18
harshav
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Rep: Reputation: Disabled
throughput is not displaying

i am using ubuntu 12.04
i installed ns2-2.31
i am getting an error in terminal


harsha@Harsha:~/ns2/ns-allinone-2.31/ns-2.31$ java -jar CRCN.jar
Yeah
/home/harsha/ns2/ns-allinone-2.31/ns-2.31/test.tcl
routing
/home/harsha/ns2/ns-allinone-2.31/ns-2.31/test.tcl is called by ns
Starting Simulation...
NS EXITING...
num_nodes is set 10
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
Process exitValue: 0

jTabbedPane1_stateChanged(ChangeEvent e) called.
java.io.FileNotFoundException: (No such file or directory)
 
Old 03-11-2013, 05:31 AM   #19
Khaled ELmishad
LQ Newbie
 
Registered: May 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
harshav you have to install java correctly and if you did otherwise you will get to CRCN problems, anyway I did not use the CRCN GUI try to write and run scripts of your calculation and drawings instead.
 
Old 10-08-2013, 08:37 AM   #20
fattabiouni
LQ Newbie
 
Registered: Sep 2013
Posts: 23

Rep: Reputation: Disabled
crcn throughput.awk

hi there,
is there any command to run throughput.awk that will relate to our throughput on my crcn?

as u mention before this:
echo | awk -f Throughput2007.awk

the results:
Average Throughput[kbps] = -0.00 StartTime=1000000.00 StopTime=0.00
Average Throughput[kbps] = -0.00 StartTime=1000000.00 StopTime=0.00

how can i fix this??
thank you in advance
 
Old 10-13-2013, 04:56 AM   #21
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 20 .

Please try out one or more of the other *th* awk scripts:
avg_throughput.awk
avg_throughput(zigbee).awk
flow-thr.awk
genthroughput.awk
instantThroughput.awk*
instantThroughputStll.awk
Throughput2007.awk
throughput_newtrace.awk
thruput.awk
wireless-thr.awk
→ → →
awk_scripts-09.2013.tar.bz2 :
https://docs.google.com/file/d/0B7S2...it?usp=sharing

-
 
1 members found this post helpful.
Old 10-26-2013, 12:11 AM   #22
fattabiouni
LQ Newbie
 
Registered: Sep 2013
Posts: 23

Rep: Reputation: Disabled
understanding nam

what about the nam?? i'm using nam1.13 for ns2.31..
but i dont understand the topology created by nam...the node represent for what and also the others

thank knudfl...
 
Old 10-26-2013, 12:12 AM   #23
fattabiouni
LQ Newbie
 
Registered: Sep 2013
Posts: 23

Rep: Reputation: Disabled
I've found some error while run this command:
./ns scenariowcett.tcl

mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground
mobile/tworayground.cc: TwoRayGround propagation model assume flat ground

what should i do??

thank you in advance

Last edited by fattabiouni; 10-26-2013 at 03:55 AM.
 
Old 10-28-2013, 08:33 AM   #24
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 23 .

"scenariowcett.tcl" : Unknown file.

You can attach scenariowcett.tcl to a new post, as scenariowcett.tcl.txt

Attachments : That's the paper clip tool in the 'Advanced Editor'.


-
 
1 members found this post helpful.
Old 11-08-2013, 02:42 AM   #25
fattabiouni
LQ Newbie
 
Registered: Sep 2013
Posts: 23

Rep: Reputation: Disabled
thank you for your help knudfl..
thank god, the throughput.awk script that you gave me previously working perfectly..

i just want to know that the node below represent CR users or PR users?

set val(chan) Channel/WirelessChannel ; #Channel Type
set val(prop) Propagation/TwoRayGround ; #Radio propagation model
set val(netif) Phy/WirelessPhy ; #Network interface type
set val(ant) Antenna/OmniAntenna ; #Antenna model
set val(rp) WCETT ;#Routing Protocol
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
set val(ifqlen) 50 ;# max packet in ifq
set val(mac) Mac/802_11 ;# MAC type
set val(ll) LL ;# link layer type
set val(nn) 8 ;# number of mobilenodes
set val(ni) 2 ;# number of interfaces
set val(channum) 2 ;# number of channels per radio
set val(cp) ./scenario2random.tcl ; # topology traffic file
set val(stop) 50 ;# simulation time
#set Pt_ 0.04 ;#power level
# ==================================================================
# Main Program
# ======================================================================


# Initialize Global Variables
set ns_ [new Simulator]
set tracefd [open scenario2.tr w]
$ns_ trace-all $tracefd

# set up topography object
set topo [new Topography]
$topo load_flatgrid 500 500

#create nam
set namtrace [open scenario2.nam w]
$ns_ namtrace-all-wireless $namtrace 500 500

# Create God
set god_ [create-god $val(nn)]
# configure node
Phy/WirelessPhy set Pt_ 0.33 ;#power level
$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) -topoInstance $topo -agentTrace ON -routerTrace ON -macTrace ON -movementTrace ON

for {set i 0} { $i < $val(ni)} {incr i} {
set chan_($i) [new $val(chan)]
}


#configure for interface and channel

$ns_ node-config -ifNum $val(ni) -channel $chan_(0)


for {set i 0} {$i < $val(ni) } {incr i} {
$ns_ add-channel $i $chan_($i)
}

for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) set recordIfall 1
$node_($i) random-motion 0 ;# disable random motion
}


source $val(cp) ; #source topology and traffic file generated by others

# Tell nodes when the simulation ends
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ at $val(stop).0 "$node_($i) reset";
}
$ns_ at $val(stop).0002 "puts \"NS EXITING...\" ; $ns_ halt "
proc stop {} {
global ns_ tracefd
$ns_ flush-trace
close $tracefd
exec nam scenario2.nam &
exit 0
}
puts "Starting Simulation..."
$ns_ run


-->if it represent the CR user, what command should i put to add the node that represent primary users?
 
Old 11-08-2013, 03:20 AM   #26
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 25 .

Repeat : Attach your files as ..
scenariowcett.tcl.txt, and scenario2random.tcl.txt,
by using the "paper clip tool" !


P.S. : If you show code in a post, code tags is a must.
* http://www.linuxquestions.org/questi....php?do=bbcode
* http://www.linuxquestions.org/questi...gs-4175464257/
I.e. type [/code] at code end, and [code] at code start.
*** Please edit post #25 to use code tags.

-
 
Old 11-08-2013, 04:25 AM   #27
fattabiouni
LQ Newbie
 
Registered: Sep 2013
Posts: 23

Rep: Reputation: Disabled
scenario2wcett & scenario2random

here's the tcl script that i used
Attached Files
File Type: txt scenario2wcett.tcl.txt (2.6 KB, 60 views)
File Type: txt scenario2random.tcl.txt (4.9 KB, 44 views)
 
Old 11-08-2013, 07:26 AM   #28
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 27, # 23 . My result :
Code:
$ ns-crcn
num_nodes is set 8
INITIALIZE THE LIST xListHead
INITIALIZE THE LIST xListHead
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 572.1
SORTING LISTS ...DONE!
SORTING LISTS ...DONE!
NS EXITING...
The executable "ns-crcn" is from the package crcn-ns-2.31-ubuntu10_i386.deb (4MB)
https://drive.google.com/file/d/0B7S...it?usp=sharing
Please install the package : $ sudo dpkg -i crcn-ns-2.31-ubuntu10_i386.deb
... to compare with your seemingly failed 'ns'.

List of generated files concerning scenario2wcett.tcl / scenario2random.tcl :
Chanfile 50kB, ITfile 194kB, scenario2.nam 20MB, scenario2.tr 14MB, Trafficfile 6kB.

$ nam scenario2.nam : OK.
-
Attached Thumbnails
Click image for larger version

Name:	scenario2.nam.jpg
Views:	49
Size:	24.2 KB
ID:	13906  

Last edited by knudfl; 11-08-2013 at 07:40 AM.
 
1 members found this post helpful.
Old 11-08-2013, 07:37 AM   #29
fattabiouni
LQ Newbie
 
Registered: Sep 2013
Posts: 23

Rep: Reputation: Disabled
it turn out like this after i enter tne command dpkg:
dpkg: requested operation requires superuser privilege

what should i do?
how about the node? is it for CR user environment only?
 
Old 11-08-2013, 07:43 AM   #30
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 29 .

Sorry, it is of course $ sudo dpkg -i crcn-ns-2.31-ubuntu10_i386.deb


Quote:
How about the node? Is it for CR user environment only ?
Which node ? What do you mean ? Please rephrase.

-
 
  


Reply

Tags
crcn, ns2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
trying to display throughput in CRCN GUI humairaafzal73 Linux - Software 33 11-21-2015 05:10 AM
nam not working ns2.33 fabe856 Linux - Software 3 04-20-2012 01:03 PM
problem in displaying throughput in crcn patch in ns2 humairaafzal73 Linux - Software 0 02-07-2012 04:37 AM
[SOLVED] NS2 Nam Issue atb2010 Linux - Newbie 2 03-17-2011 09:52 AM
problem with opening nam in ns2 MLinux Linux - General 1 11-16-2010 04:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration