LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-14-2013, 01:14 PM   #1
chenil
LQ Newbie
 
Registered: Apr 2013
Posts: 21

Rep: Reputation: Disabled
error in tcl file


Sir;

I am using Ubuntu 10.10 and NS-2.34

After doing AODV successfully;

While trying to execute some advanced programs of aodv downloaded material from http://http://www.cs.iastate.edu/~jx...e/ns2_related/ ;

Done successfully 1. ./configure
2. make clean
3. make
4. sudo make install

but after executing aodv_script.tcl getting output as follows:

Usage: aodv_script.tcl [-type tcp|cbr] [-nn nodes] [-stop time]

Where i am going wrong?

attaching aodv_script.tcl
Attached Files
File Type: txt aodv_script.tcl.txt (5.3 KB, 27 views)
 
Old 07-14-2013, 03:28 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by chenil View Post
Sir;
I am using Ubuntu 10.10 and NS-2.34 fter doing AODV successfully; While trying to execute some advanced programs of aodv downloaded material from

Done successfully 1. ./configure
2. make clean
3. make
4. sudo make install

but after executing aodv_script.tcl getting output as follows:

Usage: aodv_script.tcl [-type tcp|cbr] [-nn nodes] [-stop time]

Where i am going wrong?
The error is very clear: it's telling you what you need to provide, and you're not providing it. So, as it says, specify the type, number of nodes, and stop time.
 
Old 07-15-2013, 03:52 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
A valid link to the files ..
http://www.cs.iastate.edu/~jxiawang/...e/ns2_related/
> 04-Dec-2005
 
Old 07-15-2013, 01:13 PM   #4
chenil
LQ Newbie
 
Registered: Apr 2013
Posts: 21

Original Poster
Rep: Reputation: Disabled
error in tcl

Thank you...

I have done changes in aodv_script.tcl like added
1. number of nodes
2. type as "tcp"


After executing ns adov_script.tcl getting following error

opt(sc) : scen-10-670*670-1000.0
opt(x): 670
opt(y): 670
opt(cpCBR): cbr-10-test-1000.0
opt(cpTCP): tcp-10-test-1000.0
num_nodes is set 10
Can not open results/profile.prof
INITIALIZE THE LIST xListHead
Can not open results/profile.prof
Can not open results/profile.prof
Can not open results/profile.prof
Can not open results/profile.prof
Can not open results/profile.prof
Can not open results/profile.prof
Can not open results/profile.prof
Can not open results/profile.prof
Can not open results/profile.prof
start blackhole attack
Loading connection pattern...
couldn't read file "tcp-10-test-1000.0": no such file or directory
while executing
"source.orig tcp-10-test-1000.0"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source $opt(cpTCP)"
invoked from within
"if {$opt(type) == "tcp"} {
source $opt(cpTCP)
} else {
source $opt(cpCBR)
}"
(file "aodv_script1.tcl" line 185)

not able to understand the error...
Will you help me..?

If i add type as "cbr" i didn't get any output.
also if i add tcp in line 185... again error

Usage: aodv_script1.tcl [-type tcp|cbr] [-nn nodes] [-stop time]
Attached Files
File Type: txt aodv_script1.tcl.txt (5.3 KB, 21 views)
 
Old 07-15-2013, 04:45 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 4 .
Quote:
Can not open results/profile.prof
$ mkdir results && touch results/profile.prof

Quote:
couldn't read file "tcp-10-test-1000.0": no such file or directory
$ touch tcp-10-test-1000.0
.. The touch command creates an empty file.

Ns-2.34 patched with the http://www.cs.iastate.edu/~jxiawang/...e/ns2_related/
blackhole files :
Code:
$ ./ns-blackh aodv_script.tcl -type tcp -nn 10 -stop 100
 reading the command arguments
reading arguments
 reading the command arguments
 reading the command arguments
reading arguments
 reading the command arguments
 reading the command arguments
reading arguments
 reading the command arguments
opt(sc) : scen-10-670*670-100
opt(x): 670
opt(y): 670
opt(cpCBR): cbr-10-test-100
opt(cpTCP): tcp-10-test-100
num_nodes is set 10
INITIALIZE THE LIST xListHead
start blackhole attack
Loading connection pattern...
Loading scenario file...
Load complete...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
set attacking_ : 1
the target of blackholw is 4 
set attacking_ : 1
attackTimeout, send route request
NS EXITING...
And the same with "-type cbr". Both will create aodv_trace.tr, trace.profile ,,
.. and lots of out.txt* , profile.log*.

-

Last edited by knudfl; 07-15-2013 at 05:12 PM.
 
Old 07-24-2013, 10:21 AM   #6
chenil
LQ Newbie
 
Registered: Apr 2013
Posts: 21

Original Poster
Rep: Reputation: Disabled
After doing changes in aodv_script.tcl m grtting following error;
I am unable to understand the errors..can you elaborate?

opt(sc) : scen-10-670*670-1000.0
opt(x): 670
opt(y): 670
opt(cpCBR): cbr-10-test-1000.0
opt(cpTCP): tcp-10-test-1000.0
num_nodes is set 10
Can not open results/profile.prof
INITIALIZE THE LIST xListHead
Can not open results/profile.prof
Can not open results/profile.prof
Can not open results/profile.prof
Can not open results/profile.prof
Can not open results/profile.prof
Can not open results/profile.prof
Can not open results/profile.prof
Can not open results/profile.prof
Can not open results/profile.prof
start blackhole attack
Loading connection pattern...
couldn't read file "tcp-10-test-1000.0": no such file or directory
while executing
"source.orig tcp-10-test-1000.0"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source $opt(cpTCP)"
invoked from within
"if {$opt(type) == "tcp"} {
source $opt(cpTCP)
} else {
source $opt(cpCBR)
}"
(file "aodv_script.tcl" line 185)




Quote:
Originally Posted by knudfl View Post
# 4 .

$ mkdir results && touch results/profile.prof


$ touch tcp-10-test-1000.0
.. The touch command creates an empty file.

Ns-2.34 patched with the http://www.cs.iastate.edu/~jxiawang/...e/ns2_related/
blackhole files :
Code:
$ ./ns-blackh aodv_script.tcl -type tcp -nn 10 -stop 100
 reading the command arguments
reading arguments
 reading the command arguments
 reading the command arguments
reading arguments
 reading the command arguments
 reading the command arguments
reading arguments
 reading the command arguments
opt(sc) : scen-10-670*670-100
opt(x): 670
opt(y): 670
opt(cpCBR): cbr-10-test-100
opt(cpTCP): tcp-10-test-100
num_nodes is set 10
INITIALIZE THE LIST xListHead
start blackhole attack
Loading connection pattern...
Loading scenario file...
Load complete...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
set attacking_ : 1
the target of blackholw is 4 
set attacking_ : 1
attackTimeout, send route request
NS EXITING...
And the same with "-type cbr". Both will create aodv_trace.tr, trace.profile ,,
.. and lots of out.txt* , profile.log*.

-
 
Old 07-24-2013, 11:46 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 6 .

You are getting the same error :
couldn't read file "tcp-10-test-1000.0": no such file or directory.

Please read post # 5 : $ touch tcp-10-test-1000.0
I.e. first create an empty file by name tcp-10-test-1000.0
... And when the simulations works, you can create a real file
with e.g. ns-2.xx/indep-utils/cmu-scen-gen/<tools>. See "README".


"Can not open results/profile.prof" : Please do like suggested in post #5.

-
 
  


Reply

Tags
aodv-ns2, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
NS2: regarding error during run .tcl file bhupendrapatel Linux - Software 4 05-03-2013 09:32 AM
Little error (not harmful) exists in tcl.SlackBuild (source slackbuilds for Tcl) blancamolinos Slackware 3 01-14-2013 05:46 AM
Error in the tcl file nadeempitafi Linux - Newbie 1 12-26-2012 05:24 AM
Error while accessing tcl file jothi8 Linux - General 1 03-15-2012 08:19 AM
scheduler error in running tcl file humairaafzal73 Linux - Software 0 02-27-2012 10:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:05 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