Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-28-2012, 01:54 PM
|
#1
|
Member
Registered: Aug 2011
Posts: 155
Rep:
|
Running leach protocol on ns2 !! errors !!
Hi,
I am trying to run leach protocol on ns2.34 using ubuntu 10.10 as platform.
I get an error when i try to execute the code leach_test, after entering the right path (/home/shantanu/ns-allinone-2.34/ns-2.34/ns-234-leach/)
i give the command ./leach_test i get the error in the file leach.err as this
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 "tcl/ex/wireless.tcl" line 184)
Which is this file mobilenode.tcl which has been referred to ?? i tried running the file "test" also but i get the error as this:
couldn't read file "wireless-demo-csci694.tcl": no such file or directory
Why does this happen?? And how can i get the nam to run for leach protocol.
Please guide me as i am a little confused about how to get the outputs although i have been reading the ns2 tutorial to understand.Would be great if someone can explain the process involved in getting outputs for leach.
Regards
Shanky
|
|
|
02-28-2012, 02:43 PM
|
#2
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
Quote:
entering the right path (/home/shantanu/ns-allinone-2.34/ns-2.34/ns-234-leach/)
|
Something has gone wrong with your patching.
There should be no ns-allinone-2.34/ns-2.34/ ns-234-leach/
Please read the script 'leach-HOME-setup234.sh.txt'
to know what's supposed to be done.
The "sh test" command ( and "sh leach_test" ) must be run in
/home/shantanu/ns-allinone-2.34/ns-2.34/, where both files are,
if you copied the files to the right location.
.
Last edited by knudfl; 02-28-2012 at 02:49 PM.
|
|
|
02-28-2012, 03:50 PM
|
#3
|
Member
Registered: Aug 2011
Posts: 155
Original Poster
Rep:
|
Hi knudfl,
Have clarified that mistake.There are two files leach_test, one in /home/shantanu/ns-allinone-2.34/ns-2.34/ns-234-leach/ and the other in
/home/shantanu/ns-allinone-2.34/ns-2.34/ .I was trying to get the output with the former one.
I did run ./test in the path /home/shantanu/ns-allinone-2.34/ns-2.34/ but it shows me a lot of warnings.Please have a look
shantanu@ubuntu:~/ns-allinone-2.34/ns-2.34$ ./test
num_nodes is set 3
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
warning: no class variable Phy/WirelessPhy::alive_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Phy/WirelessPhy::Efriss_amp_
warning: no class variable Phy/WirelessPhy::Etwo_ray_amp_
warning: no class variable Phy/WirelessPhy::EXcvr_
warning: no class variable Phy/WirelessPhy::sleep_
warning: no class variable Phy/WirelessPhy::ss_
warning: no class variable Phy/WirelessPhy::dist_
INITIALIZE THE LIST xListHead
warning: no class variable Phy/WirelessPhy::alive_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Phy/WirelessPhy::Efriss_amp_
warning: no class variable Phy/WirelessPhy::Etwo_ray_amp_
warning: no class variable Phy/WirelessPhy::EXcvr_
warning: no class variable Phy/WirelessPhy::sleep_
warning: no class variable Phy/WirelessPhy::ss_
warning: no class variable Phy/WirelessPhy::dist_
warning: no class variable Phy/WirelessPhy::alive_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Phy/WirelessPhy::Efriss_amp_
warning: no class variable Phy/WirelessPhy::Etwo_ray_amp_
warning: no class variable Phy/WirelessPhy::EXcvr_
warning: no class variable Phy/WirelessPhy::sleep_
warning: no class variable Phy/WirelessPhy::ss_
warning: no class variable Phy/WirelessPhy::dist_
Loading connection pattern...
Loading scenario file...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 89.8
SORTING LISTS ...DONE!
NS EXITING...
Is this a common error that happens? How can it be rectified?
Thanks
|
|
|
02-28-2012, 04:33 PM
|
#4
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
No errors in post # 3.
Warnings are information, not errors.
Your test looks OK. That's the expected result.
Examples in the ns-2.27+leach thread ..
http://www.linuxquestions.org/questi...79/page17.html
A new example in post #250, other examples from post #5 etc. etc.
.
|
|
|
02-29-2012, 01:05 PM
|
#5
|
Member
Registered: Aug 2011
Posts: 155
Original Poster
Rep:
|
Hi knudfl,
As referred by you i did check out those threads , but the script "test" which you have posted in post#6 of this link
http://www.linuxquestions.org/questi...2-27-a-785379/
and the script "test" in my directory are the same.
Why do i still get huge number of warnings? although they are not regarded as errors.
Also i have 2 more questions
1) The output would be written in the directory mit/leach_sims and i went through the leach.err which still shows me the error mentioned in the post#1 and also the file leach.out is empty .What does this mean?
2)How can i get the simulation running for the leach code ,to get the nam running? which .tcl file do i have to run ?
Regards
|
|
|
02-29-2012, 02:17 PM
|
#6
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
Quote:
Why do i still get huge number of warnings ?
|
Some Linux OS, some versions / updates : No warnings.
Avoid the warnings : Edit some code, has been described
in one of the two long leach threads.
"leach.out" : I think you will find answers for it, when you
read all "400 posts"
2.27 http://www.linuxquestions.org/questi...2-27-a-785379/
2.34 http://www.linuxquestions.org/questi...2-34-a-870368/
Nam : If no "exec nam" is included in the tcl file: No nam window.
.
Last edited by knudfl; 02-29-2012 at 04:42 PM.
|
|
|
07-08-2013, 05:18 AM
|
#7
|
LQ Newbie
Registered: Jul 2013
Posts: 11
Rep:
|
Leach
Hi everybody
today only i registered please tell me from where actually leach.energy file is obtained since i have run stats.tcl but still not getting as per my modifications. Actually i wanted to find remaining energy i.e total-expended but file is not getting generated.
Pl-----------------------------------s help me
|
|
|
All times are GMT -5. The time now is 09:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|