LinuxQuestions.org
Help answer threads with 0 replies.
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 04-28-2017, 12:42 PM   #1
rc49
Member
 
Registered: May 2015
Posts: 45

Rep: Reputation: Disabled
Question calculating PDR--leach in NS2.35


i run leach application in NS2.35.
system configuration Ubuntu14.04 64bit

received output files successfully. please find attached documents below
leach.out https://drive.google.com/file/d/0B3n...ew?usp=sharing

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

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

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

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

in the files leach.save1 and leach.save2 both files have different values of total data BUT in leach.out total data=0
this is confusing.
for calculating metric PDR if the total data is data received by BS node then how could i get sent data so as to calculate packet delivery ratio

i also have to calculate other metrics like throughput and delay but different values in different files,,!!
i also searched for the same on google but havent found enough stuff to calculate PDR of leach!!
any help will be appreciated!
thank you
 
Old 04-30-2017, 04:30 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,171

Rep: Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535
The files leach.alive, leach.data, leach.energy are for meant for a graphics plot e.g. Xgraph.

I don't know if you can get anything useful from the leach.out files.
Usually the genuine trace file.tr (leach.tr) is used for PDR, e.g. with :
PDR.awk, PacketDeliveryRatio.awk, PaDeFr.awk, Pdf-0.awk, pdf.awk
https://drive.google.com/file/d/0B7S...ew?usp=sharing



"packet delivery ratio leach" https://scholar.google.dk/scholar?q=...1MAicQgQMIITAA
→ omnet++ → http://ieeexplore.ieee.org/abstract/...8/?reload=true

omnet++ https://groups.google.com/forum/?fro...!forum/omnetpp
→ leach https://groups.google.com/forum/?fro...sort:relevance
Latest postings https://groups.google.com/forum/?fro...ch%7Csort:date


-

Last edited by knudfl; 04-30-2017 at 07:13 AM.
 
Old 04-30-2017, 01:46 PM   #3
rc49
Member
 
Registered: May 2015
Posts: 45

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
what i am able to conclude on the basis of facts collected,,,,most of the authors in their papers,,,plots total received packets at base station..not the ratio actually(A:B)

i think its not possible to calculate PDR(A:B) of leach in ns2.35 via trace file unless we change leach code files..m i right?
what u say knudfl??
 
Old 04-30-2017, 02:14 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,171

Rep: Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535
Re #3.
Quote:
I think its not possible to calculate PDR(A:B) of leach in ns2.35 via trace file unless we change leach code files
I have no Idea.
Please ask Pradeepkumar http://www.nsnam.com/2015/05/leach-p...in-ns2-ns.html
... He is the latest person who have worked with the leach code.


The leach setup for ns2 is ancient. I guess the OMNeT++ leach is better ?

-
 
Old 12-26-2017, 10:40 PM   #5
mauriz
LQ Newbie
 
Registered: Dec 2017
Posts: 16

Rep: Reputation: Disabled
Quote:
Originally Posted by rc49 View Post
in the files leach.save1 and leach.save2 both files have different values of total data BUT in leach.out total data=0
this is confusing.
for calculating metric PDR if the total data is data received by BS node then how could i get sent data so as to calculate packet delivery ratio

i also have to calculate other metrics like throughput and delay but different values in different files,,!!
i also searched for the same on google but havent found enough stuff to calculate PDR of leach!!
any help will be appreciated!
thank you

Hello!
I do research on this too.
1. leach.save1 and leach.save2 used for what?
2. Did you find any solution?
Thankyou
 
Old 12-27-2017, 06:32 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,171

Rep: Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535
Re #5, @mauriz.

leach.save1 and leach.save2 : Are old saved examples of leach.out .
Not to be used for anything : You can read the files.

PDR :
Code:
$ awk -f PDR.awk leach.tr 
cbr s:102 r:199, r/s Ratio:1.9510, f:0
The file leach.tr should be present: ns-2.35/leach.tr

Perl, awk scripts https://drive.google.com/file/d/1oid...ew?usp=sharing

P.S. : Better results, see posts #1007, #1009 here
https://www.linuxquestions.org/quest...68/page68.html


-

Last edited by knudfl; 12-27-2017 at 06:37 AM.
 
Old 12-27-2017, 08:23 PM   #7
mauriz
LQ Newbie
 
Registered: Dec 2017
Posts: 16

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
leach.save1 and leach.save2 : Are old saved examples of leach.out .
Not to be used for anything : You can read the files.

-
Thanks. But why when I check leach.out the result is always show Total Data = 0 ?
Even though leach.save1 and save2 have different results? Is it time-based? Then I'd better process the data from leach.out or leach.save?
Additionally, is there an explanation of the data that displayed? Like, what is total energy, total data, total alive, how can node die, etc?
 
Old 12-28-2017, 03:23 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,171

Rep: Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535
Re #7.
Quote:
is there an explanation of the data that displayed
May be somewhere in the documentation .... leach-doc.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing


Quote:
when I check leach.out the result is always show Total Data = 0
1. You are using an OS that's not ns2-leach friendly? Ubuntu 10.04 seems to work →
→ #1013 → https://www.linuxquestions.org/quest...68/page68.html
2. Wrong patch. Wrong ns2 version.
``ns-2.34 and leach+pegasis_ns234.patch.gz creates better results →
https://www.linuxquestions.org/quest...68/page68.html → #1007 #1009

-
 
Old 12-28-2017, 09:18 AM   #9
mauriz
LQ Newbie
 
Registered: Dec 2017
Posts: 16

Rep: Reputation: Disabled
calculating PDR--leach in NS2.35

Thank you for sharing. I am using leach in ns-2.35, Ubuntu 14.04. I do patch with tutorial on youtube (https://www.youtube.com/watch?v=XX9fooieASAS&sns=sms). In the video, leach.out shows Total Data = 0 too, is this error on leach patch or does leach can not be used on ns-2.35? Thank you

Last edited by mauriz; 12-28-2017 at 09:25 AM.
 
Old 12-28-2017, 10:57 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,171

Rep: Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535
Re #9.

The "Leach for ns-2.35" may have worked once.
With a specific OS, at a specific OS update level.
I have tested "leach_ns235-Jun2015.patch" with multiple OSs.
No perfect results with any, I think.
Ref. http://www.nsnam.com/2015/05/leach-p...in-ns2-ns.html


Quote:
shows Total Data = 0
? Which file ? ?

A typical leach.out from a contemporary OS: Uploaded as leach.out__ns235.txt →
https://drive.google.com/file/d/1bFw...ew?usp=sharing
All . https://drive.google.com/drive/folde...lk?usp=sharing

-

Last edited by knudfl; 12-28-2017 at 10:58 AM.
 
Old 12-28-2017, 08:09 PM   #11
mauriz
LQ Newbie
 
Registered: Dec 2017
Posts: 16

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
The "Leach for ns-2.35" may have worked once.
With a specific OS, at a specific OS update level.
I have tested "leach_ns235-Jun2015.patch" with multiple OSs.
No perfect results with any, I think.
Ref. http://www.nsnam.com/2015/05/leach-p...in-ns2-ns.html
-
Thank you. I also use the ref
So, Is there any simulator I can use for LEACH and DTN?
Actually I use ns-2.35 because I know ns-2.35 can be used for DTN.
Ref. https://www.netlab.tkk.fi/tutkimus/dtn/ns/

Quote:
? Which file ? ?
leach.out
 
Old 12-29-2017, 04:58 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,171

Rep: Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535
Re #11.

? Do you want to combine DTN with Leach ?

Note : You can have as many ns-allinone-2.xx as you want, installed at the same time.
But do never add any *PATH text to .bashrc. Not required.



-

Last edited by knudfl; 12-29-2017 at 06:46 AM.
 
Old 12-29-2017, 09:25 PM   #13
mauriz
LQ Newbie
 
Registered: Dec 2017
Posts: 16

Rep: Reputation: Disabled
calculating PDR--leach in NS2.35

yes, but I think I need much ref for simulate it
Did you have any ref, Mr?
 
Old 12-30-2017, 04:45 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,171

Rep: Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535
Quote:
I think I need much ref for simulate it
Please explain in common words, what your question really means.
( Ref. is short for reference. And "it" can mean anything.)


To use "Leach": ns-2.34 + an old Ubuntu version is required : For Leach only.
For DTN : A separate ns-allinone-2.35, for DTN only.
( And a /usr/local/bin/ns-orig for default simulations.)


-
 
Old 12-31-2017, 09:36 AM   #15
mauriz
LQ Newbie
 
Registered: Dec 2017
Posts: 16

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Please explain in common words, what your question really means.
( Ref. is short for reference. And "it" can mean anything.)
-
It = wsn (leach) over dtn

Quote:
To use "Leach": ns-2.34 + an old Ubuntu version is required : For Leach only.
For DTN : A separate ns-allinone-2.35, for DTN only.
( And a /usr/local/bin/ns-orig for default simulations.) -
Is there a simulator to simulate leach and dtn? Not only leach or dtn, but both of them
 
  


Reply

Tags
leach, leach ns235, ns2, ns2 ns-allinone, ubuntu 14.04


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
problem with running leach protocol in ns2.34 leach.er Mohamed69 Linux - Software 14 04-16-2018 07:10 AM
How to using NAM Trace format to find PDR, Packet Loss, Timeout, RTT in NS2? krist_chamber Linux - Networking 2 12-02-2015 01:04 PM
leach.out total energy increase leach ns2.34 linuxUser123linux Linux - Software 1 07-13-2013 04:54 AM

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

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