LinuxQuestions.org
Review your favorite Linux distribution.
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 01-17-2014, 11:36 AM   #661
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268

@ Aska123 (#648),
I wrote awk scripts to extract the data required. Then, I imported the generated data to excel and did my calculations.
So, what you need to extract is the time at which the CH sends the data, and time at which the BS receives it. The values are present in the leach.out file.

Quote:
Originally Posted by Aska123 View Post
Please provide link

Thanks
 
Old 01-17-2014, 11:39 AM   #662
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
@eng_mohamed_sc (#632),

If by "original Leach", you mean the version by Heizelman et al (on ns2.1b), the code is definitely not going to work.
It was for an ns2 version which is now obsolete. Obsolete because that ns2 version can no longer be run on today's OS.
Their work was done in 1999, so you'll have to use the OS that was in use then to install ns2.1b.

 
1 members found this post helpful.
Old 01-18-2014, 12:00 AM   #663
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
hello deepa, glad to see u back here..thanx for your reply..please tell me what is the problem in my post #658.Not a single cluster is forming, all nodes are dead n hence total sent data is also showing 0.and also tell how total energy is only 3.29? please help.
 
Old 01-18-2014, 12:15 AM   #664
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
@deepa 2111

Hello

I have successfully installed leach on ns2.34
I have no error in leach.err file
I have output in leach.out and leach.tr file.

Please suggest how to plot graph for leach output.
I have installed both gnuplot and xgraph on my system.

I do not know how to select columns from out file.
I also tried Tracegraph software, but it is not loading trace file.

please help.

I want to measure energy of nodes in network

Thanks
 
Old 01-18-2014, 12:18 AM   #665
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Quote:
Originally Posted by deepa_2111 View Post
@ Aska123 (#648),
I wrote awk scripts to extract the data required. Then, I imported the generated data to excel and did my calculations.
So, what you need to extract is the time at which the CH sends the data, and time at which the BS receives it. The values are present in the leach.out file.

Thanks a lot deepa ji.

Happy to see you here.

I do not know how to write awk.
First i have to learn awk.
can you provide some awk script so that i can learn how to write them specific to leach protocol.



Thanks

Last edited by Aska123; 01-18-2014 at 12:22 AM. Reason: points
 
Old 01-18-2014, 12:20 AM   #666
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Quote:
Originally Posted by keepwalking123 View Post
@ASKA123 hey thanx for reply.actually i searched and while searching i came to latest patch file of exidus i.e. exidus-pegasis-leach-ns234-patch.2.tar.so i install that one successfully but in leach.err it shows following error.

couldn't read file "../../rca/ns-ranode.tcl": no such file or directory
while executing
"source.orig ../../rca/ns-ranode.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 ../../rca/ns-ranode.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 18)
invoked from within
"source.orig mit/uAMPS/sims/uamps.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 mit/uAMPS/sims/uamps.tcl"
(file "tcl/mobility/leach.tcl" line 18)
invoked from within
"source.orig 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 tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 187)
please help.
i have changed path in uAMPS.tcl also.
try to find location of file which is missing and copy file from there and paste in dirctory in which it is showing missing.
 
Old 01-18-2014, 12:35 AM   #667
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@ASKA123
hey it shows couldn't read file "../../rca/ns-ranode.tcl but ns-ranode.tcl is present in ns2.34/mit/rca directory.so whats issue now?
 
Old 01-18-2014, 01:20 AM   #668
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
hello ASKA123 and deepa,i have solved that problem and successfully installed leach. but now the leach.out is showing result different and i think its somewhat wrong.please check these files and tell me..plzzz..awaiting for your reply..thank you..
Attached Files
File Type: pdf leach.out.pdf (164.1 KB, 31 views)
File Type: pdf leach.tr.pdf (192.4 KB, 15 views)
 
Old 01-18-2014, 01:23 PM   #669
mhmdmahdi
Member
 
Registered: Nov 2013
Location: Indonesia
Distribution: Ubuntu 12.04
Posts: 41

Rep: Reputation: 22
Quote:
Originally Posted by deepa_2111 View Post
Just this is not enough.
You need to make changes to the recv functions (tcl functions) so that a CH can hear ADV from other CHs.
for my thesis, I chose to implement an improved version of EECH to implement a multi hop network, and hence modified the code accordingly.
It is not very difficult to do so.

Like TB0ne says, we cannot write the entire code, and the exercise is pointless if you cannot implement your ideas.

So, to answer ur question, at cluster formation phase, each CH also needs to receive ADV from other CHS, and you need to determine an algorithm to choose which your next hop CH is to be.
hi deepa_2111, i want to implement multi-hop routing on communication between CH node and non-CH nodes, multi-hop only used when non-CH nodes send their data to CH. CH send data to BS using single-hop.
can you give me hint how to make it works?


Quote:
Originally Posted by keepwalking123 View Post
hello ASKA123 and deepa,i have solved that problem and successfully installed leach. but now the leach.out is showing result different and i think its somewhat wrong.please check these files and tell me..plzzz..awaiting for your reply..thank you..
this problem already solved.
check my post #598 here: http://www.linuxquestions.org/questi...68/page40.html
 
Old 01-19-2014, 09:45 AM   #670
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
@ mhmmahdi,

I don't understand ... why would you want to implement multi-hop routing on communication between CH node and non-CH nodes ?
non-CH nodes are within line of sight distance with the CH, so why use multi-hop ? It's a waste of energy to use multi-hop in a direct line of sight communication situation.

Quote:
Originally Posted by mhmdmahdi View Post
hi deepa_2111, i want to implement multi-hop routing on communication between CH node and non-CH nodes, multi-hop only used when non-CH nodes send their data to CH. CH send data to BS using single-hop.
can you give me hint how to make it works?

Last edited by deepa_2111; 01-19-2014 at 09:47 AM.
 
Old 01-19-2014, 09:49 AM   #671
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Awk is very easy, and I suggest you learn it as it's gonna help you a lot more in future applications.
You can find really good tutorials on the internet.
It is not specific to leach protocol. You can use awk to do whatever you wish.


Quote:
Originally Posted by Aska123 View Post
Thanks a lot deepa ji.

Happy to see you here.

I do not know how to write awk.
First i have to learn awk.
can you provide some awk script so that i can learn how to write them specific to leach protocol.



Thanks
 
Old 01-19-2014, 09:51 AM   #672
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
@ Aska123,

I haven't used gnuplot or xgraph.
Initially, what I did was to use excel to get the values of energy etc after every 10 sec. You can use textpad etc to seach and select all values in a leach.out.
After that, I realised awk scripts are a better way to extract the energy, data packets received and no. of nodes alive after every 10 sec. A single coomand in awk should do the trick for you.
Please learn awk.


Quote:
Originally Posted by Aska123 View Post
@deepa 2111

Hello

I have successfully installed leach on ns2.34
I have no error in leach.err file
I have output in leach.out and leach.tr file.

Please suggest how to plot graph for leach output.
I have installed both gnuplot and xgraph on my system.

I do not know how to select columns from out file.
I also tried Tracegraph software, but it is not loading trace file.

please help.

I want to measure energy of nodes in network

Thanks
 
1 members found this post helpful.
Old 01-20-2014, 12:36 AM   #673
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
@Deepa2111

Thanks mam
 
Old 01-20-2014, 05:42 AM   #674
mhmdmahdi
Member
 
Registered: Nov 2013
Location: Indonesia
Distribution: Ubuntu 12.04
Posts: 41

Rep: Reputation: 22
Quote:
Originally Posted by deepa_2111 View Post
@ mhmmahdi,

I don't understand ... why would you want to implement multi-hop routing on communication between CH node and non-CH nodes ?
non-CH nodes are within line of sight distance with the CH, so why use multi-hop ? It's a waste of energy to use multi-hop in a direct line of sight communication situation.
yes, i agree with you. but i don't know, my prof. asked me to analyse that.
he said multi-hop will be useful in a big size network.. still need to prove his opinion right or wrong.
thanks for your answer anyway
 
Old 01-20-2014, 07:57 AM   #675
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@mhmdmahdi, hey i tried as u said..but it gives error as ns-pegasis:command not found.I hav checked for ns-pegasis execution file in ns2.34 folder but it is absent.i think the error is due to it only.i have installed exidus-pegasis-leach-ns234-patch.2 not the your package i.e. pegasis-ns-2.34-ubuntu10_i386.deb. Is it for leach protocol? and is it give correct output of leach protocol..if yes..please provide that package here and also tell me steps to install it..please i have spent lots of days to get correct output but still facing problems..please help..
 
  


Reply

Tags
leach, leach-warning50, ns2, ns2 ns234, pegasis



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
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 04:23 AM
labview stopped at "init tmp resource files" on FC4 baosheng Linux - Software 2 09-28-2007 11:02 AM
ORiNOCO WLAN card not working - "failed to allocate resource" hauneboo Linux - Laptop and Netbook 1 11-29-2005 09:08 AM
What "kernel opts" allow PC to power down with "turning energy off"? kornerr Linux - General 1 03-10-2005 12:07 PM
nvidia insmod: "Device or resource busy" w/GeForce 4 MX KeithSpook Linux - Hardware 4 03-03-2004 12:21 PM

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

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