LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-09-2015, 04:40 AM   #16
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154

Post #4, @kumrawat : Welcome to LQ.
Quote:
.. done leach protocol patching using NS2.34 and getting output.
.. can you explain how to generate coding part
Please explain what you mean by "coding part".


If you mean "How to run the LEACH simulation", please read
`28 Oct 2014´ https://groups.google.com/forum/?fro...rs/_1GiuzK2Ixw
etc. etc.

The simulation command is shown in post #2.
http://www.linuxquestions.org/questi...-4175524367/#2

-
 
Old 02-09-2015, 01:03 PM   #17
nadine01
Member
 
Registered: Oct 2014
Posts: 62

Rep: Reputation: Disabled
hello ,

i try to add leach and the first problem is

cp: cannot stat `Makefile': No such file or directory
 
Old 02-09-2015, 01:31 PM   #18
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
← ref. #17, @nadine01

Please explain what you are doing.
An error output like :
» cp: cannot stat `Makefile': No such file or directory «
.... makes no sense without the preceding command.
Besides that, there is no "cp" in any of the commands ?
→ See post #5.

→ You are supposed to follow the steps in post #5 strictly !
→ Ubuntu 12.04.x - i686.
( Or later versions of Ubuntu : 12.10 .. 15.04 -i686.)

-
 
Old 02-09-2015, 01:50 PM   #19
nadine01
Member
 
Registered: Oct 2014
Posts: 62

Rep: Reputation: Disabled
sir

i don't found Makefile
i found just Makefile.in
 
Old 02-09-2015, 04:40 PM   #20
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
← ref. #19.

Repeat : » cp: cannot stat `Makefile': No such file or directory «
.... makes no sense without the preceding command.
→ → →
Please tell which command you are doing.

? $ export CC=gcc-4.4 CXX=g++-4.4 && ./install ?
? $ sudo make install ?

If the ./install fails, you will see an error message.
* And the executable 'ns' is not created :
* Then don't do 'sudo make install' !
.... Instead please show the error from the ./install run.

-
 
Old 02-13-2015, 04:45 AM   #21
emprit
Member
 
Registered: Feb 2015
Location: jl. bogor 1 no 91, malang, jawa timur, indonesia
Distribution: any linux
Posts: 81

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Example output files from CentOS 6 - i386/i686 :

leach.out https://drive.google.com/file/d/0B7S...ew?usp=sharing

-
in thats result, i can said that was 1 cluster right or no cluster? just transmit data to node neighbor, like normal pegasis, not pegasis leach.
i know pegasis is better than leach but on diferend topologi.
how if BS location on the middle area of sensor node, if we can combine leach with pegasis is good.

edit:
sorry if im on wrong place, i just comment this because name of patch "pegasis + leach" i think this combine betwen pegasis and leach.

Last edited by emprit; 02-13-2015 at 08:03 AM.
 
Old 02-26-2015, 12:31 PM   #22
Rizwanamalek
Member
 
Registered: Jan 2015
Posts: 56

Rep: Reputation: Disabled
error in implemention

Hello, I have followed the given post #2 for implementing leah in ns2.34 in cent os.

http://www.linuxquestions.org/questi...-4175524367/#2

I got error in last step is given. Please help me to solve this. There is no error in leach.err file and in leach.out there is some output with some warnings.It means leach is implemented sucesfully?
Code:
[root@localhost ns-2.34]#  ./test
ns: 
[code omitted because of length]
: invalid command name "DataGenerator/TemperatureDataGenerator"
    while executing
"DataGenerator/TemperatureDataGenerator set sensing_interval_ 0.0"
[root@localhost ns-2.34]#
 
Old 02-26-2015, 12:49 PM   #23
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
← ref. #22.
Quote:
invalid command name "DataGenerator/TemperatureDataGenerator"
That's by using the 'ns' from a mannasim install.
* You can save the mammasim ns as /usr/local/bin/ns-mannasim
* Mannasim simulations will work with $ ns-mannasim file.tcl


? Did you do ...
http://www.linuxquestions.org/questi...-4175524367/#2
→ → $ cd ns-2.34/
→ → # make install && exit

You may also have to delete all mannasim *PATH in .bashrc .


Quote:
[root@localhost ns-2.34]#
Wrong. Don't use root for ns2 commands.
( Except for # make install , # cp ns-<name> /usr/local/bin/.)


-
 
Old 02-27-2015, 01:31 AM   #24
Rizwanamalek
Member
 
Registered: Jan 2015
Posts: 56

Rep: Reputation: Disabled
Hello sir , I am still unbale to impement leach in ns2.34. I am using ns-234-leach.tar.gz insted leach+pegasis-ns234-files-2.tar.gz.

http://www.linuxquestions.org/questi...-4175524367/#2

Code:
$ tar xvf ns-234-leach.tar.gz
$ ./install
$ cd ns-2.34/
# make install && exit
after ./install what i have to do cd ns-2.34/ for leach+pegasis-ns234-files-2.tar.gz. But i have ns-234-leach for ns-234-leach.tar.gz after
Code:
$ tar xvf ns-234-leach.tar.gz
1] what is next step after ./install for ns-234-leach.tar.gz ?
 
Old 02-27-2015, 03:26 AM   #25
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
← ref #24.

Before we can continue, please respond to post #23.
Please confirm, that you got all PATH references to the mannasim ns disabled.



Quote:
I am using ns-234-leach.tar.gz
No you're not.
Post #22 says http://www.linuxquestions.org/questi...-4175524367/#2
... which is about `leach+pegasis-ns234-files-2.tar.gz´.


-
 
Old 02-27-2015, 05:59 AM   #26
Rizwanamalek
Member
 
Registered: Jan 2015
Posts: 56

Rep: Reputation: Disabled
Sir i have deleted all old mannasim ,ns2.34,leach etc. I reinstall ns2.34 .Now i have to install leach so this time i am using ns-234-leach.tar.gz for leach implemeatation. Please help me to implement it sucessecfully. From 3 week it is not implemented yet. Please give me the step for this ns-234-leach.tar.gz imlementation.
 
Old 02-27-2015, 07:05 AM   #27
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
← ref. #26.
Quote:
I have deleted all old mannasim ,ns2.34,leach etc.
No reason to delete anything.
You can have 100 times ns-allinone-2* if you want to.
But please loose the bad habit of setting an 'ns' PATH in .bashrc.

The @MayTamer "ns-234-leach.tar.gz" with the files ordered for easy install:
→ leach-ns234-patching.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
... with the edited cmu-trace.h included, I think → post #9 here
http://www.linuxquestions.org/questi...ra13-907076/#9

tar xvf ns-allinone-2.34.tar.gz , in /home/name/.
cd ns-allinone-2.34/
tar xvf leach-ns234-patching.tar.gz
./install
cd ns-2.34/
# make install


* If the simulation isn't working, please read the ~800 posts here
http://www.linuxquestions.org/questi...2-34-a-870368/
... before you ask again.
@deepa_2111 a.o. have some good suggestions.


-

Last edited by knudfl; 02-27-2015 at 07:07 AM.
 
Old 02-27-2015, 11:30 AM   #28
Rizwanamalek
Member
 
Registered: Jan 2015
Posts: 56

Rep: Reputation: Disabled
I got result of ./test what it show? implement sucessfullly?
Code:
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...
[root@localhost ns-2.34]#
there is no error in leac.err and some output in leach.out with lots of warning.This warnings is harmful?
 
Old 02-27-2015, 12:15 PM   #29
Rizwanamalek
Member
 
Registered: Jan 2015
Posts: 56

Rep: Reputation: Disabled
leach.out file

warrring=Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Code:
Creating sensor nodes...
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 (100 == BS)
*** NOTE: no connection pattern specified.
Loading scenario file...
Node 0: (65.745973803916002,92.581722416254564)
Node 1: (21.008649990432268,92.380389195112684)
Node 2: (37.201202259027028,40.606367467253641)
Node 3: (71.218022131928251,61.297971318148988)
Node 4: (35.003944130150579,11.288995440718249)
.
.
Node 98: (2.466682112993059,57.526273074339272)
Node 99: (44.071560420129238,10.71598111219517)
Max Distance for this Simulation is 139.0
Load complete...
Starting Simulation...
THRESH = 0.050000000000000003
0: *******************************************
THRESH = 0.050000000000000003
1: *******************************************
.
.
95: *******************************************
THRESH = 0.050000000000000003
96: *******************************************
THRESH = 0.050000000000000003
97: *******************************************
THRESH = 0.050000000000000003
98: *******************************************
THRESH = 0.050000000000000003
99: *******************************************
warrining
warrining
num_nodes is set 101
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 222.8
COLLISION!!!! rx_state_ = 16
COLLISION!!!! rx_state_ = 16
COLLISION!!!! rx_state_ = 16
Warning! 6: Cannot receive while transmitting.
COLLISION!!!! rx_state_ = 16
CAPTURE!!!!
COLLISION!!!! rx_state_ = 16
COLLISION!!!! rx_state_ = 16
Warning! 90: Cannot receive while transmitting.
CAPTURE!!!!
COLLISION!!!! rx_state_ = 16
COLLISION!!!! rx_state_ = 16
CAPTURE!!!!
COLLISION!!!! rx_state_ = 16
CAPTURE!!!!
COLLISION!!!! rx_state_ = 16
CAPTURE!!!!
COLLISION!!!! rx_state_ = 16
COLLISION!!!! rx_state_ = 16
CAPTURE!!!!
COLLISION!!!! rx_state_ = 16
COLLISION!!!! rx_state_ = 16

COLLISION!!!! rx_state_ = 16
COLLISION!!!! rx_state_ = 16
COLLISION!!!! rx_state_ = 16
0: Current cluster-head is 36, code is 4,  dist is 54
1: Current cluster-head is 54, code is 3,  dist is 19
2: Current cluster-head is 36, code is 4,  dist is 10

98: Current cluster-head is 54, code is 3,  dist is 22
99: Current cluster-head is 72, code is 1,  dist is 8
warrining
warrining
BS Received data 6 , 2.4419000565539166 from 6 at time 2.475757658622062
This represents data from nodes: 3 71 22 86 43 82 60 19 25 6
warrining
BS Received data 72 , 2.4510521664083242 from 72 at time 2.523872449750634
This represents data from nodes: 80 15 26 76 92 99 32 85 44 30 13 46 45 41 17 4 67 87 78 72
warrining
warrining
BS Received data 90 , 2.545868041876532 from 90 at time 2.5839898671277113
This represents data from nodes: 8 81 7 90
warrining
BS Received data 23 , 2.6518841708152991 from 23 at time 2.6887534815410832
This represents data from nodes: 34 70 29 51 18 33 49 94 31 38 77 11 21 23
warrining
BS Received data 90 , 2.9115320418765318 from 90 at time 2.9505679350009366

BS Received data 90 , 19.083116041876568 from 90 at time 19.186149245262534
This represents data from nodes: 7 90
warrining

warrining
warrining
BS Received data 54 , 19.317996130964147 from 54 at time 19.354854861315694
This represents data from nodes: 16 65 5 97 39 1 66 93 56 27 98 40 89 64 10 61 96 54
warrining
BS Received data 72 , 19.385452166408328 from 72 at time 19.424932998251506
This represents data from nodes: 80 15 26 76 92 99 32 85 44 30 13 46 45 41 17 4 67 87 78 72
warrining
warrining
warrining
BS Received data 90 , 19.695788041876558 from 90 at time 19.764074399218512
This represents data from nodes: 7 90
BS Received data 6 , 19.763756056553945 from 6 at time 19.796365751545483
This represents data from nodes: 3 3 71 71 60 60 19 19 22 86 43 82 25 6
BS Received data 90 , 19.728076041876559 from 90 at time 19.831036374514373
This represents data from nodes: 7 90
THRESH = 0.052631578947368418
0: *******************************************
THRESH = 0.052631578947368418
1: *******************************************
THRESH = 0.052631578947368418
.
.
THRESH = 0.052631578947368418
45: *******************************************
THRESH = 0.05263157894736luster-head is 27, code is 3,  dist is 13
6: Current cluster-head is 25, code is 2,  dist is 9
7: Current cluster-head is 25, code is 2,  dist is 54
8: Current cluster-head is 25, code is 2,  dist is 42
.
.
97: Current cluster-head is 10, code is 1,  dist is 21
98: Current cluster-head is 10, code is 1,  dist is 7
99: Current cluster-head is 25, code is 2,  dist is 56
warrining
warrining
BS Received data 71 , 27.89310004662822 from 71 at time 27.965694167038887
This represents data from nodes: 22 0 83 60 35 11 62 14 68 20 71
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ i****************************
THRESH = 0.052631578947368418
98: *******************************************
THRESH = 0.052631578947368418
99: *******************************************

At 20:
		Total Energy = 9.8122142144143396
		Total Data = 2299
		Total Alive = 100

warrining
warrining
0: Current cluster-head is 71, code is 4,  dist is 30
1: Current cluster-head is 27, code is 3,  dist is 6

76: Current cluster-head is 10, code is 1,  dist is 55
77: Current cluster-head is 25, code is 2,  dist is 50
78: Current cluster-head is 10, code is 1,  dist is 42
79: Current cluster-head is 10, code is 1,  dist t time 23.425745631648265
This represents data from nodes: 1 65 59 16 56 39 40 5 64 93 27
warrining
warrining
BS Received data 10 , 23.595628187465227 from 10 at time 23.632188013032174
This represents data from nodes: 13 87 84 96 47 17 12 57 74 66 2 28 67 24 55 69 98 73 37 52 46 45 89 9 30 76 54 42 79 50 61 78 97 44 4 36 10
warrining
warrining
warrining
BS Received data 71 , 23.861100046628209 from 71 at time 23.894363801863651
This represents data from nodes: 22 0 83 60 35 11 62 14 68 20 71
warrining
warrining
BS Received data 27 , 23.861100166144702 from 27 at time 23.933755699162415
This represents data from nodes: 1 65 59 16 56 39 40 5 64 93 27
warrining
BS Received data 25 , 23.864940313852316 from 25 at time 23.966616834786862
This represents data from nodes: 88 21 92 75 33 51 31 95 43 58 3 63 49 34 72 91 94 85 80 18 26 81 99 8 32 86 7 48 82 29 41 6 15 53 19 70 23 77 38 90 25
warrining
BS Received data 27 , 24.36510nstead
warrining
warrining
BS Received data 27 , 28.397100166144714 from 27 at time 28.431465991155008
This represents data from nodes: 1 65 59 16 56 39 40 5 64 93 27
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use _addr_ and dst_port_ instead
BS Received data 71 , 29.909100046628225 from 71 at time 29.982508328116413
This represents data from nodes: 22 0 83 60 35 11 62 14 68 20 71

At 30:
		Total Energy = 13.071192636399873
		Total Data = 3122
		Total Alive = 100

warrining
BS Received data 25 , 29.912940313852317 from 25 at time 30.018745432884636
This represents data from nodes: 88 21 92 75 33 51 31 95 43 58 3 63 49 34 72 91 94 85 80 18 26 81 99 8 32 86 7 48 82 29 41 6 15 53 19 70 23 77 38 90 25
warrining
warrining
BS Received data 27 , 30.413100166144719 from 27 at time 30.446352132866341
This represents data from nodes: 1 65 59 16 56 39 40 5 64 93 27
warrining
warrining
warrining
BS Received data 71 , 30.413100046628227 from 71 at time 30.485792324591944
This represents data from nodes: 22 0 83 60 35 11 62 14 68 20 71
warrining
warrining
BS Received data 10 , 30.483628187465232 from 10 at time 30.522403666467607
This represents data from nodes: 13 87 84 96 47 17 12 57 74 66 2 28 67 24 55 69 98 73 37 52 46 45 89 9 30 76 54 42 79 50 61 78 97 44 4 36 10
warrining
warrining
BS Received data 71 , 30.917100046628228 from 71 at time 30.94950297122471
This represents data from nodes: 22 0 83 60 35 11 62 14 68 20 71
warrining
warrining
BS Received data 27 , 30.917100166144721 from 27 at time 30.984223908777629
This represents data from nodes: 1 65 59 16 56 39 40 5 64 93 27
warrining
Warning dst_ is no longer being supported in NS. dst_ 0xfffffffng supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
warrining
 
Old 02-27-2015, 12:26 PM   #30
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
← ref. #28.

No errors in the terminal output : Just the expected output.
(As you will know when reading http://www.linuxquestions.org/questions/tags/leach/ )
You have an executable 'ns' with "some leach".

** The only file showing the full `error output´ is "leach.err".


About the warnings : Post #50 here
http://www.linuxquestions.org/questi...368/page4.html


-
 
  


Reply

Tags
leach, ns2, pegasis, pegasis#2


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
leach.out total energy increase leach ns2.34 linuxUser123linux Linux - Software 1 07-13-2013 05:54 AM
[SOLVED] cfdisk : FATAL ERROR: Bad logical partition 10: enlarged logical partitions overlap riller Fedora 8 05-31-2012 09:17 AM
I got an error while running leach package in ns2.. help me to get out of this error. rkgowrishankar Linux - Software 1 02-07-2012 05:51 AM


All times are GMT -5. The time now is 07:36 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration