LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 06-11-2014, 04:59 AM   #61
hasina
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Rep: Reputation: Disabled
Does anyone solved the problem Data = 0 in leach ns-2.34


I am working with leach and my leach.out shows
At 23.20000000000006: - mit/uAMPS/stats.tcl
Total Energy = 16.416541167470896
Total Data = 0
Total Alive = 14

Simulation complete. - mit/uAMPS/stats.tcl
I have read many threads here but no one answered why we are getting Data =0?
can anyone help?
 
Old 06-22-2014, 06:13 AM   #62
fusionzhang
LQ Newbie
 
Registered: Jun 2014
Posts: 9

Rep: Reputation: Disabled
couldn't read file ... rca/ns-ranode.tcl

hello,deepa_2111,
I got the exactly the same problem with you now,could you tell me how do you solve the problem specificly?

Quote:
Originally Posted by deepa_2111 View Post
Hey ..

Thanks a lot ...

I've got it running. Regarding ns-allinone-2.35-RC4, it is coz I'm running it on cygwin, and I think this is the most stable version.
I was trying to run the leach_test file, and i had the issues i mentioned above. I fixed it by manually typing the path to remove any extra spaces.

I am going to analyse my results now.

Thanks for the "code" suggestions.
 
Old 02-22-2015, 09:05 PM   #63
amita_s12
LQ Newbie
 
Registered: Feb 2015
Posts: 29

Rep: Reputation: Disabled
how to run leach

can any one tell me how to run leach on ns2.35 or on ns2.34. or pl. available me the tcl file of leach
 
Old 02-23-2015, 04:23 AM   #64
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← Ref. post #63, @amita_s12.

The mannasim LEACH for ns-2.35 ( ns-2.34 can also do mannasim )
https://github.com/paultsr/ns-allinone-2.35
$ git clone git://github.com/paultsr/ns-allinone-2.35.git
... Tcl files are available for the "mannasim leach",
or can be generated with the included tools.
INFO, mannasim :
. http://www.linuxquestions.org/questions/tags/mannasim/
. https://groups.google.com/forum/?fro...asim|sort:date
. http://network-simulator-ns-2.7690.n...asim&sort=date


The MIT leach : leach+pegasis-ns234-files-2.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
The MIT leach uses a dedicated wireless.tcl (and wireless-demo-csci694.tcl ).
No other tcl files are available.
But lots of simulation options in 'leach_test'.
And with various "nodescen" files.
INFO :
. http://www.linuxquestions.org/questions/tags/pegasis/
. https://groups.google.com/forum/?fro...each|sort:date
. https://groups.google.com/forum/?fro...asis|sort:date
. http://network-simulator-ns-2.7690.n...ys=0&sort=date
. http://network-simulator-ns-2.7690.n...ys=0&sort=date


-
 
Old 04-12-2015, 09:46 PM   #65
reenkamal
LQ Newbie
 
Registered: Sep 2014
Posts: 14

Rep: Reputation: Disabled
hello all,
i want to work on HELLO flooding attack on leach routing protocol in ns2.34 on ubuntu 10.04. I have already installed leach patch in it and now i want to implement hello flood attack but i have no idea how to do it.. please help me.
 
Old 05-07-2015, 06:02 PM   #66
hassan10
LQ Newbie
 
Registered: Apr 2015
Posts: 12

Rep: Reputation: Disabled
Quote:
Originally Posted by MayTamer View Post
I've wrote this simple awk file https://docs.google.com/uc?id=0BzLWx...download&hl=en to calculate the actual cumulative expanded energy by all nodes over time, it's for Leach-C. to be executed for Leach just comment or delete the first 'if condition'. download it into "/mit/leach_sims" and run the command:
wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34/mit/leach_sims$ awk -f TotEn.awk leach-c.energy // for Leach-C
wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34/mit/leach_sims$ awk -f TotEn.awk leach.energy // for Leach
Hi MayTamer
Can you please give me the file TatEn.Awk for leach-c.energy and TotEn.awk for leach.energy . Because the link is not working . Please
Thinks
 
Old 05-08-2015, 01:42 AM   #67
amita_s12
LQ Newbie
 
Registered: Feb 2015
Posts: 29

Rep: Reputation: Disabled
hi all
i have successfully generated tcl file for leach from mannasim. can anyone tell which parameters should be change to get the different scenario.
can xgraph be generated from leach mannasim file.?
 
Old 05-08-2015, 05:23 AM   #68
hassan10
LQ Newbie
 
Registered: Apr 2015
Posts: 12

Rep: Reputation: Disabled
#64
Hi
How can I use Leach+pegasis-ns234-files-2 with ns-allinone-2.34,
thanks
 
Old 05-08-2015, 05:44 AM   #69
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #68.

""How can I use Leach+pegasis-ns234-files-2 ...""
Please read the Leach+pegasis postings. Has been answered numerous times.
. http://www.linuxquestions.org/questions/tags/pegasis/

Build example, CentOS 6.6 - 32bits
1) tar xvf ns-allinone-2.34.tar.gz
2) cd ns-allinone-2.34/
3) tar xvf leach+pegasis-ns234-files-2.tar.gz
4) ./install
5) cd ns-2.34/
6) # make install

-
 
1 members found this post helpful.
Old 05-08-2015, 01:03 PM   #70
hassan10
LQ Newbie
 
Registered: Apr 2015
Posts: 12

Rep: Reputation: Disabled
Hi
to make leach.alive to leach.alive.txt you should make script awk for this
check this link for more information (make translation )

-
http://blog.csdn.net/delphiwcdj/article/details/6033259
 
Old 07-03-2015, 10:40 AM   #71
arifmahmudi
LQ Newbie
 
Registered: Mar 2015
Posts: 6

Rep: Reputation: Disabled
Quote:
Originally Posted by deepa_2111 View Post
Hello ,

Thanks for ur replies. I modified the code as well ::

In \mac\Wireless-Phy.cc:
Code:
if (energy_)
	  { 
		if(alive_ != 0) // Deepa
		{
			if (energy_->remove(pktEnergy(Pt_, PXcvr_, ch->size())) != 0) 
			{
		  		printf("alive = 0\n");
		  		alive_ = 0;
			}
		} // Deepa
	  }
i.e., add the <code> if(alive_ != 0) </code> wherever the remove energy function is called,

and in mit\rca\energy.cc :
Code:
int EnergyResource::remove(double amount)
{
  double new_level = energy_level_ - amount;

  if(new_level >= 0 )
  {
  	energy_level_ = new_level;
  	expended_ += amount;
  } // Deepa
check if the new_level is greater or equal to 0. if it is not, energy cant be removed
whati is this code for sir?
 
Old 11-24-2015, 11:49 PM   #72
doanhapro
LQ Newbie
 
Registered: Nov 2015
Posts: 8

Rep: Reputation: Disabled
I have installed leach and leach-c protocol but how to plot graph from leach.alive, leach.energy and leach.data file......
And how to calculate network lifetime and remaining energy for both leach and leach-c protocol.
 
Old 11-25-2015, 10:18 AM   #73
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #72.

The first question :
Create the plot file : $ awk -f leach__nodes-alive.awk leach.alive >> leach.alive.txt
Plot the file : $ xgraph leach.alive.txt &
The awk script http://www.linuxquestions.org/questi...-4175556129/#9
... and please read the thread.
This "leach_ns235-Jun2015.patch" (#11) for a 64bits OS actually supplies usable files.
Which may be a problem with the previous LEACH patches : Not good with a contemporary 32bits OS.

Second question : I don't know.
You can try here https://stackoverflow.com/questions/tagged/ns2
And maybe https://groups.google.com/forum/?fro...forum/ns-users
* NS-2 is old. No support from the ns2 developers for years : They support ns3 !


-

Last edited by knudfl; 11-25-2015 at 10:28 AM.
 
Old 11-25-2015, 10:48 PM   #74
doanhapro
LQ Newbie
 
Registered: Nov 2015
Posts: 8

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Re #72.

The first question :
Create the plot file : $ awk -f leach__nodes-alive.awk leach.alive >> leach.alive.txt
Plot the file : $ xgraph leach.alive.txt &
The awk script http://www.linuxquestions.org/questi...-4175556129/#9
... and please read the thread.
This "leach_ns235-Jun2015.patch" (#11) for a 64bits OS actually supplies usable files.
Which may be a problem with the previous LEACH patches : Not good with a contemporary 32bits OS.

Second question : I don't know.
You can try here https://stackoverflow.com/questions/tagged/ns2
And maybe https://groups.google.com/forum/?fro...forum/ns-users
* NS-2 is old. No support from the ns2 developers for years : They support ns3 !


-
tks you


how to create files
leach.data.txt
leach.energy.txt ?
 
Old 11-26-2015, 06:11 AM   #75
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #74.

Use Google, learn to use Google. You are supposed to search Google before asking.
`leach__nodes-alive.awk' : Found in a few seconds ( last month.)
`leach.data.awk' : Your search. Or you can write the script yourself.
`leach_energy.awk' >> "leach_energy1.awk" / *energy2* : A few seconds ...
http://blog.csdn.net/delphiwcdj/article/details/6033459
... The scripts are attached as leach_energy*.awk.txt .
-
Attached Files
File Type: txt leach_energy1.awk.txt (511 Bytes, 48 views)
File Type: txt leach_energy2.awk.txt (545 Bytes, 49 views)

Last edited by knudfl; 11-26-2015 at 06:21 AM.
 
  


Reply

Tags
leach, leach ns235, ns2, tcl-pp



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
installing leach patch in ns2.34 in ubuntu9.10 g_vaibh Ubuntu 19 04-09-2015 09:43 AM
how to install leach patch in ns2.34 in ubuntu 9.10 anjon.sunny Linux - Newbie 9 04-30-2014 04:05 AM
LEACH protocol installation on NS2.27 Scofield Linux - General 255 03-08-2012 05:19 PM
Leach Installation on NS2 Asmaa Seyam Linux - General 3 10-19-2010 12:31 PM
[SOLVED] NS2 LEACH make problem dkpcad Linux - Wireless Networking 2 10-02-2010 09:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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