LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Closed Thread
  Search this Thread
Old 08-28-2010, 09:54 AM   #121
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

@ reem , post # 119 : Please ask @ nour-eddine or @ emtarik05 :
http://www.linuxquestions.org/questi...10-a-825970/#8


--------------------------

Post # 120 , @ Arslan Rana : Welcome to LQ.
Please start a new thread, when the subject is off topic.
This thread is about LEACH only. And then please specify version of Ubuntu.
>>> http://www.linuxquestions.org/questi...ux-software-2/ >> 'New Thread'

http://www.linuxquestions.org/linux/...Ask_a_Question
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.linuxquestions.org/linux/rules.html
..
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-25-2010, 09:27 AM   #122
Arslan Rana
LQ Newbie
 
Registered: Aug 2010
Posts: 4

Rep: Reputation: 0
Hello i have installed leach on ns2.27 and run the test file successfully kindly tell me about the further procedure to run leach code.Thanks
 
Old 10-20-2010, 08:07 AM   #123
hariss7
LQ Newbie
 
Registered: Jul 2010
Posts: 6

Rep: Reputation: 0
hi every one. i have installed ns also add the leach and run a file demo694.nam it is tcl file. tcl,ex. but when i checked the code of this file the routing protocole of this file is DSDV, CAN any tell me his this leach code file, if not then what can i do to run leach code, kndly tel me m very thank to all of u.thanx

Last edited by hariss7; 10-20-2010 at 08:08 AM.
 
Old 10-22-2010, 02:30 AM   #124
reem
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Rep: Reputation: 0
having error during leach simulation

Hi knudlf
i am working on LEACH on NS 2.34. its was installed successfully. i am ruuning leach-test with different values but now i am having the following error when a node died during simulation.

Node 17 is DEAD!!!!
ns: _o434 checkAlive:
(_o12 cmd line 1)
invoked from within
"_o12 cmd removeif _o439"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o12" line 2)
(SplitObject unknown line 2)
invoked from within
"$chan removeif [[$self node] set netif_(0)]"
(procedure "_o434" line 13)
(Application/LEACH checkAlive line 13)
invoked from within
"_o434 checkAlive"

can u help me in this. how can i solve it.
 
Old 10-22-2010, 05:56 AM   #125
Arslan Rana
LQ Newbie
 
Registered: Aug 2010
Posts: 4

Rep: Reputation: 0
I am working on leach protocol in ns 2.27.while running file wireless.tcl the following error occured kindly help me as soon as possible also tell me that for the running of leach code which file we have to run.




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)
 
Old 10-23-2010, 12:33 AM   #126
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
# 125 : Assume ns-allinone-2.27/ns-2.27/tcl/ex/wireless.tcl
1)
cd ns-allinone-2.27/ns-2.27/
2)
ln -s ns ns227-leach : So that you are sure, the LEACH executable is used.
3)
./ns227-leach tcl/ex/wireless.tcl
..... The reply is .....
Code:
Usage: tcl/ex/wireless.tcl
        mandatory arguments:
                [-x MAXX] [-y MAXY]
        optional arguments:
                [-cp conn pattern] [-sc scenario] [-nn nodes]
                [-seed seed] [-stop sec]
 
Old 10-23-2010, 08:57 AM   #127
emtarik05
LQ Newbie
 
Registered: Mar 2010
Posts: 10

Rep: Reputation: 3
tarik

Quote:
Originally Posted by reem View Post
Hi knudlf
i am working on LEACH on NS 2.34. its was installed successfully. i am ruuning leach-test with different values but now i am having the following error when a node died during simulation.

Node 17 is DEAD!!!!
ns: _o434 checkAlive:
(_o12 cmd line 1)
invoked from within
"_o12 cmd removeif _o439"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o12" line 2)
(SplitObject unknown line 2)
invoked from within
"$chan removeif [[$self node] set netif_(0)]"
(procedure "_o434" line 13)
(Application/LEACH checkAlive line 13)
invoked from within
"_o434 checkAlive"

can u help me in this. how can i solve it.
what changes have you done ????
the error is in the function checkAlive when the application try to remove the node 17 from the interface !!
 
Old 10-23-2010, 12:27 PM   #128
reem
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by emtarik05 View Post
what changes have you done ????
the error is in the function checkAlive when the application try to remove the node 17 from the interface !!
i installed LEACH manually by making changes in the required files using steps written in NS2 Leach Implementation by Jason A. Pamplin and using mit.tar.gz.

thn i set some global variables like follows

export RCA_LIBRARY=/ns-allinone-2.34/ns-2.34/mit/rca
export uAMPS_LIBRARY=/ns-allinone-2.34/ns-2.34/mit/uAMPS
export PATH=/ns-allinone-2.34/tcl8.4.14/unix
export PATH=/ns-allinone-2.34/tk8.4.14/unix
export PATH=/ns-allinone-2.34/bin
export LD_LIBRARY_PATH=/ns-allinone-2.34/tcl8.4.18/unix
export LD_LIBRARY_PATH=/ns-allinone-2.34/tk8.4.18/unix
export LD_LIBRARY_PATH=/ns-allinone-2.34/otcl-1.13
export LD_LIBRARY_PATH=/ns-allinone-2.34/library
export TCL_LIBRARY=/ns-allinone-2.34/tcl8.4.18/library
export RCA_LIBRARY=/ns-allinone-2.34/ns-2.34/mit/rca

thn i changed dst_ to dst_addr_ in ns_leach.tcl.

now i dont know how can i fix that bug.
pls help me

pls help me if any one knows about fixing this error. i really need it.

Last edited by reem; 10-27-2010 at 01:19 PM.
 
Old 10-24-2010, 01:03 AM   #129
Arslan Rana
LQ Newbie
 
Registered: Aug 2010
Posts: 4

Rep: Reputation: 0
# 126 knudfi now i get this error..


can't read "opt(num_clusters)": no such element in array
while executing
"expr 1.5*$opt(num_clusters)"
invoked from within
"expr int([expr 1.5*$opt(num_clusters)])+1"
invoked from within
"set opt(spreading) [expr int([expr 1.5*$opt(num_clusters)])+1]"
(file "/home/haris/ns-allinone-2.27/ns-2.27/tcl/mobility/leach.tcl" line 12)
invoked from within
"source.orig /home/haris/ns-allinone-2.27/ns-2.27/tcl/mobility/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 /home/haris/ns-allinone-2.27/ns-2.27/tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 186)
 
Old 10-30-2010, 02:34 AM   #130
reem
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by reem View Post
i installed LEACH manually by making changes in the required files using steps written in NS2 Leach Implementation by Jason A. Pamplin and using mit.tar.gz.

thn i set some global variables like follows

export RCA_LIBRARY=/ns-allinone-2.34/ns-2.34/mit/rca
export uAMPS_LIBRARY=/ns-allinone-2.34/ns-2.34/mit/uAMPS
export PATH=/ns-allinone-2.34/tcl8.4.14/unix
export PATH=/ns-allinone-2.34/tk8.4.14/unix
export PATH=/ns-allinone-2.34/bin
export LD_LIBRARY_PATH=/ns-allinone-2.34/tcl8.4.18/unix
export LD_LIBRARY_PATH=/ns-allinone-2.34/tk8.4.18/unix
export LD_LIBRARY_PATH=/ns-allinone-2.34/otcl-1.13
export LD_LIBRARY_PATH=/ns-allinone-2.34/library
export TCL_LIBRARY=/ns-allinone-2.34/tcl8.4.18/library
export RCA_LIBRARY=/ns-allinone-2.34/ns-2.34/mit/rca

thn i changed dst_ to dst_addr_ in ns_leach.tcl.

now i dont know how can i fix that bug.
pls help me

pls help me if any one knows about fixing this error. i really need it.
hi knudfl and emtarik
any body pls help me. i have searched this on net but couldnt find any help. kindly guide me if any of you has any idea of solving it. emtarik told me the reason of this error but didnt tell me how to resolve it.
 
Old 11-23-2010, 09:43 PM   #131
wcdj
LQ Newbie
 
Registered: Nov 2010
Posts: 7

Rep: Reputation: 0
Hi,I am a newbie here and glad to see everyone.
the original test file is like this,
#!/bin/bash
cd tcl/ex
ns wireless-demo-csci694.tcl
sleep 2

cd ../../
./leach_test
=======
My question is that why run wireless_demo-.. before leach_test, why do this? thx a lot!

Last edited by wcdj; 11-25-2010 at 07:43 AM. Reason: my questions
 
Old 11-26-2010, 12:25 AM   #132
wcdj
LQ Newbie
 
Registered: Nov 2010
Posts: 7

Rep: Reputation: 0
Hello, everyone, I find a mistake that in the leach_test file, x=1000 y=1000, but in the 100nodes.txt file the nodes are all in 100*100. Is this an error? If is, maybe we must modify the genscen file i think. thank you !
 
Old 11-26-2010, 11:32 AM   #133
deepak.stoic
LQ Newbie
 
Registered: Sep 2010
Posts: 2

Rep: Reputation: 0
can anyone please mail me leach code for ns2.34 as rapidshare links are not working.
Thanks

Last edited by deepak.stoic; 11-27-2010 at 01:41 AM.
 
Old 11-26-2010, 12:39 PM   #134
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
@ deepak.stoic, post #133 : Welcome to LQ. .. .. ..

The "tarik-ns234-leach.tar.bz2" has been sent to you.

ns-234-leach.tar.gz etc. :
http://www.linuxquestions.org/questi...34-a-870368/#5

( Old link with "old version" tarik-ns234-leach :
https://docs.google.com/leaf?id=0B7S...thkey=CJzYt5QP )
..

Last edited by knudfl; 04-05-2011 at 12:21 PM.
 
Old 11-26-2010, 07:50 PM   #135
wcdj
LQ Newbie
 
Registered: Nov 2010
Posts: 7

Rep: Reputation: 0
Smile Hello

Quote:
Originally Posted by knudfl View Post
@ deepak.stoic, post #133 : Welcome to LQ. .. .. ..

The "tarik-ns234-leach.tar.bz2" has been sent to you.

Time to edit post # 133, and delete your mail address to avoid spam.

..
New link with tarik-ns234-leach :
https://docs.google.com/leaf?id=0B7S...thkey=CJzYt5QP
..
Hello, could you help me to answer the questions post #131 and #132, plz!
#131: I cannot understand x=1000, y=1000, but in 100nodes.txt file, all nodes in 100*100
#132: I think to run ns wireless-demo-csci694.tcl is to configure mobile nodes, right?

Thank you very much!

Last edited by wcdj; 11-27-2010 at 07:56 AM.
 
  


Closed Thread

Tags
leach, leach-ns227, ns2, ns227



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in simulating Black Hole Attack in AODV Protocol through NS2 in FC8 shyan Linux - Newbie 3 02-17-2015 03:21 PM
NS2 installation ds_priyaa Fedora 2 05-28-2008 02:23 AM
NS2 installation eby83 Linux - Newbie 2 06-11-2007 01:08 AM
ns2 installation pranoti Linux - Software 2 06-11-2007 12:45 AM
LXer: Interview with Bernard Leach (iPodLinux) LXer Syndicated Linux News 0 10-31-2006 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:06 AM.

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