LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 01-31-2012, 04:39 AM   #196
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,536

Rep: Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506

# 195

And again : Do not use sudo for any commands in ns2.

About "test" : May be you don't have the file ?
Or you are trying to run 'test' in a wrong directory ?

The command 'pwd' will reply with your location.
Should be /home/zahariahmanap/ns-allinone-2.34/ns-2.34/ .

.
 
Old 01-31-2012, 06:11 AM   #197
farab
LQ Newbie
 
Registered: Aug 2011
Posts: 17

Rep: Reputation: 22
chmod 777 test
 
Old 02-02-2012, 11:59 PM   #198
nzny
LQ Newbie
 
Registered: Jan 2012
Posts: 22

Rep: Reputation: Disabled
tq knudfl and all,

i got another error while trying to run 'test':

Code:
./test: line 3: ns: command not found
what should I do?
 
Old 02-03-2012, 12:50 AM   #199
farab
LQ Newbie
 
Registered: Aug 2011
Posts: 17

Rep: Reputation: 22
Quote:
Originally Posted by nzny View Post
tq knudfl and all,

i got another error while trying to run 'test':

Code:
./test: line 3: ns: command not found
what should I do?
You have to recompile ns. It says that your have not installed NS. or your bashrc file have not set correctly. Overall you have not NS installed on your system.
 
Old 02-03-2012, 02:09 AM   #200
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,536

Rep: Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506
Post #198, @ nzny : "ns: command not found".


The recommended action to have 'ns' in your PATH :

cd ns-allinone-2.34/ns-2.34/ && sudo make install
I.e. 'make install' will copy ns to /usrr/local/bin/ ,
thus having 'ns' in a system path.

The same for 'nam', cd ns-allinone-2.34/nam-1.14/ && sudo make install

.
 
Old 02-03-2012, 02:10 AM   #201
nzny
LQ Newbie
 
Registered: Jan 2012
Posts: 22

Rep: Reputation: Disabled
tq farab

i've edited my bashrc. however, could you show me how did you exactly edit your bashrc?

thanks
 
Old 02-05-2012, 03:51 AM   #202
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,536

Rep: Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506
# 201.

Actually ns will do fine with no "adding any *PATH"
or changes at all in .bashrc .
Which is also impossible, if you have more than one ns2 version installed.
( I can have easily have 10 versions of ns-allinone-2.xx on each OS.)

***** ns is hard coded to know, where its libraries are located !


The old text about adding *PATH is probably only valid for Windows/Cygwin.

.
 
Old 02-08-2012, 04:27 AM   #203
ayaan
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Rep: Reputation: Disabled
hi ! i have succesfully patched ns2.34 leach and i run the test it is showing no errors.
but when i try to run leach.tcl file i am getting this error

moin@moin-Precision-WorkStation-370:~/Desktop$ ns leach.tcl
couldn't read file "mit/uAMPS/ns-leach.tcl": no such file or directory
while executing
"source.orig mit/uAMPS/ns-leach.tcl"
("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 mit/uAMPS/ns-leach.tcl"
(file "leach.tcl" line 7)
plz reply soon
 
Old 02-08-2012, 04:39 AM   #204
ayaan
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Rep: Reputation: Disabled
hi ! and when i try to run leach_test i got this error
moin@moin-Precision-WorkStation-370:~/ns-allinone-2.34/ns-2.34/ns-234-leach$ ns leach_test
invalid command name "alg=leach"
while executing
"alg=leach"
(file "leach_test" line 5)
 
Old 02-08-2012, 04:42 AM   #205
ayaan
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Rep: Reputation: Disabled
hi ! i want to know how to check the tcl and nam files of leach protocol can u plz reply as soon as possible
 
Old 02-08-2012, 07:54 AM   #206
khushbushah
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Rep: Reputation: Disabled
I have same problem but in fedora 14

Quote:
Originally Posted by knudfl View Post
Welcome to LQ.

Add 'hardy' to /etc/apt/sources.list : g++-3.3....gcc-4.2((g++-4.2)) will be available.
sudo gedit /etc/apt/sources.list ; sudo apt-get update
Code:
deb http://76.73.4.58/ubuntu/ hardy-updates main
deb http://76.73.4.58/ubuntu/ hardy universe
deb http://security.ubuntu.com/ubuntu hardy-security main
deb http://security.ubuntu.com/ubuntu hardy-security universe
A missing "Resource/Energy" : It was not compiled into ns.
All new objects must be added to 'Makefile' ( Makefile.in ).
Patch ns234-leach.tar.bz2 https://docs.google.com/uc?id=0B7S25...CJzYt5QP&hl=en
May be compare the Makefile with the original ns-2.27 LEACH Makefile :
https://docs.google.com/uc?id=0B7S25...CNPCuaYP&hl=en

EDIT : See post # 22

..
Hi
please help i had same problem of Resource/energy in leach.err file
What can i do?where do I require changes?I cant find location in Fedora14
Thanks
Khushbu
 
Old 02-08-2012, 09:13 AM   #207
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,536

Rep: Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506
Post # 206, @khushbushah.

Fedora 14 : With no other error indications, suggest ...
Start from scratch in /home/<user-name>/ns-allinone-2.34/
http://www.linuxquestions.org/questi...dora13-907076/
.. using the script leach-HOME-setup234.sh
And don't forget the new modified file cmu-trace.h

And then : cd ns-allinone-2.34/ns-2.34/ &&
./configure && make clean && make && ./test

.

Last edited by knudfl; 02-08-2012 at 09:16 AM.
 
Old 02-09-2012, 01:02 AM   #208
ayaan
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Rep: Reputation: Disabled
Hi !i have this problem when i am running some of the files of leach after succesfully patching with no errors or warnings

moin@moin-Precision-WorkStation-370:~/ns-allinone-2.34/ns-2.34/ns-234-leach/tcl/ex$ ns wireless.tcl
couldn't read file "tcl/lib/ns-mobilenode.tcl": no such file or directory
while executing
"source.orig tcl/lib/ns-mobilenode.tcl"
("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 tcl/lib/ns-mobilenode.tcl"
(file "wireless.tcl" line 184)
plz help me out
 
Old 02-09-2012, 02:05 AM   #209
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,536

Rep: Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506
@ayaan, post #208.

The correct way of doing the command "ns wireless.tcl" is :
cd /ns-allinone-2.34/ns-2.34/ns-234-leach/tcl/ex/ && ns wireless.tcl

Some files.tcl can be used from a random location, some from the
ns-2.34/ folder, and for others you will have to cd to their location.


#204 about leach_test : Please read the file 'test'.
And I think there are some answers about leach_test
somewhere in the thread.

.
 
Old 02-10-2012, 12:09 AM   #210
ayaan
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Rep: Reputation: Disabled
Hi ! i want to know which of the files to be generated for leach simulations and where the results will be stored,
bcos when i try to run stats.tcl the file is generating but i cant find the output.so plz help me to solve this problem.

the other thing is that when i try to run some tcl files i get this error what it means ?

moin@moin-Precision-WorkStation-370:~/ns-allinone-2.34/ns-2.34/ns-234-leach/mit/uAMPS/sims$ ns leach.tcl
couldn't read file "mit/uAMPS/ns-leach.tcl": no such file or directory
while executing
"source.orig mit/uAMPS/ns-leach.tcl"
("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 mit/uAMPS/ns-leach.tcl"
(file "leach.tcl" line 7)
 
  


Reply

Tags
leach, leach-deepa#774, leach-warning50, ns2 ns234, pegasis


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
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 04:23 AM
labview stopped at "init tmp resource files" on FC4 baosheng Linux - Software 2 09-28-2007 11:02 AM
ORiNOCO WLAN card not working - "failed to allocate resource" hauneboo Linux - Laptop and Netbook 1 11-29-2005 09:08 AM
What "kernel opts" allow PC to power down with "turning energy off"? kornerr Linux - General 1 03-10-2005 12:07 PM
nvidia insmod: "Device or resource busy" w/GeForce 4 MX KeithSpook Linux - Hardware 4 03-03-2004 12:21 PM


All times are GMT -5. The time now is 07:29 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration