LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-03-2011, 02:36 PM   #136
farab
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Rep: Reputation: 22

@ jimctu
I searched the mit directory by simple "grep dst_" and I found there are 3 files use this old method:

ns-bsapp.tcl
ns-leach.tcl
ns-mte.tcl

To get rid off this warning open them with any text editor like gedit, ctrl+h search dst_ and replace with dst_addr_
They are located in mit/uAMPS.

Last edited by farab; 09-03-2011 at 02:37 PM.
 
2 members found this post helpful.
Old 09-04-2011, 04:26 PM   #137
jimctu
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Rep: Reputation: Disabled
Thank you Farab! Now the warnings are gone...
but I still get that energy consumption above 200J even though I have made the changes suggested by deepa =T
there was another thing that should have been done to solve this?
 
Old 09-04-2011, 04:41 PM   #138
farab
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Rep: Reputation: 22
Quote:
Originally Posted by jimctu View Post
Thank you Farab! Now the warnings are gone...
but I still get that energy consumption above 200J even though I have made the changes suggested by deepa =T
there was another thing that should have been done to solve this?
Do you mean the energy in lines like this in leach.out?

At 525.70000000005098:
Total Energy = 290.75993866236303
Total Data = 50473
Total Alive = 4
 
Old 09-04-2011, 04:59 PM   #139
jimctu
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Rep: Reputation: Disabled
yes! Exactly this Farab...it shouldn't be below 200J? As my network configuration has 100 nodes with 2J each.
 
Old 09-05-2011, 12:05 AM   #140
farab
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Rep: Reputation: 22
I think this is not the sum of the nodes energy. maybe it shows the total energy consumed by network as it shows the total data transfered in line after. or maybe it considered the ack packes from BS too.
I dont know...
have you ns-2.27 or ns-2.25 installed? if yes test the result there.
 
Old 09-05-2011, 05:39 AM   #141
monazEssam
LQ Newbie
 
Registered: Aug 2011
Posts: 22

Rep: Reputation: Disabled
@exidus:
Thanks for you support to me but i still have a question we are running the leach using the test file in ns2.34 folder and in this file "wireless-demo-csci694.tcl" file is used where in it the Number of nodes is 100 nodes and the trace file used is "694demo.tr "

but in the test file , the "./leach_test" is run and if you open it you will find it use "tcl/ex/wireless.tcl" as its tcl file and if you open "tcl/ex/wireless.tcl" file you will find the number of nodes is 51 nodes and the trace file is "out.tr"

so I got confused about which tcl and trace files should i take in my consideration when i run the leach ?
 
Old 09-05-2011, 04:07 PM   #142
farab
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Rep: Reputation: 22
Quote:
Originally Posted by monazEssam View Post
@exidus:
Thanks for you support to me but i still have a question we are running the leach using the test file in ns2.34 folder and in this file "wireless-demo-csci694.tcl" file is used where in it the Number of nodes is 100 nodes and the trace file used is "694demo.tr "

but in the test file , the "./leach_test" is run and if you open it you will find it use "tcl/ex/wireless.tcl" as its tcl file and if you open "tcl/ex/wireless.tcl" file you will find the number of nodes is 51 nodes and the trace file is "out.tr"

so I got confused about which tcl and trace files should i take in my consideration when i run the leach ?
Your should always run leach by "./leach_test" and if you take a look at leach_test itself, you see for example the number of node (nn) or other parameters that will push to "tcl/ex/wireless.tcl" and force it to ignore its preset values and use these parameters instead.
finally your simulation result is in : /mit/leach_sims
I have made some awk and script and graphs for energy consummation and number and alive nodes that I can share them with anyone who interested in.
 
1 members found this post helpful.
Old 09-05-2011, 04:41 PM   #143
jimctu
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Rep: Reputation: Disabled
I don't now farab...
tomorrow I'll have a look at how the energy consumption is made...
but i still think there is something wrong with this...

by the way, can you send me your awk scripts? =)
 
Old 09-05-2011, 11:36 PM   #144
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
# 142 @farab
Quote:
I have made some awk and script and graphs for energy consummation and number
and alive nodes that I can share them with anyone who interested in.
Suggest : Put the scripts in a folder ( leach-scripts ) and tar
the folder ( tar -cf ).
... And upload the "leach-scripts.tar" to Google Docs ( Shared ),
so everybody can download the scripts.

( Please include a text file in the folder telling what they are used for.)

Thank you.
.

Last edited by knudfl; 09-05-2011 at 11:39 PM.
 
Old 09-06-2011, 01:55 AM   #145
farab
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Rep: Reputation: 22
Here is all trace file of LEACH protocol on ubuntu 11.04.

Notes:

1. You shold have "Evince" installed as document reader for .eps files.
2. You shold have Last version of "xgraph". You can download it here: http://xgraph.org/linux/xgraph_1.39.tar.gz
root login and extract xgraph_1.39.tar.gz into /usr/bin.
more info: http://xgraph.org.
3. Simply run "energy", "alive" and "dead" by "./" or "sh" in terminal or double click and select "Run".
4. You can copy them to your leach_sims folder and test them on your result of simulation.
5. More updates is on the way.
6. farabf33@gmail.com for any questions.
 
2 members found this post helpful.
Old 09-06-2011, 08:43 AM   #146
jimctu
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Rep: Reputation: Disabled
I noticed something weird...
when I modify any leach file I should go to the ns-2.34 and I do a make clean and make commands
but I think the changes I made are not being executed...there is anything else it must be done after you change the files?

when I tried to run the Leach-c, I got this error:

Code:
 
can't read "env(uAMPS_LIBRARY)": no such variable
    while executing
"source $env(uAMPS_LIBRARY)/ns-leach.tcl"
    (file "tcl/mobility/leach-c.tcl" line 7)
    invoked from within
"source.orig tcl/mobility/leach-c.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)
so I changed the file leach-c.tcl that was like this

Code:
source $env(uAMPS_LIBRARY)/ns-leach.tcl
to

Code:
source mit/uAMPS/ns-leach.tcl
source mit/uAMPS/ns-leach-c.tcl
it should have solved my problem, but I still keep getting the same error above, even after I changed the file and there is no more env(uAMPS_LIBRARY) on it.
 
Old 09-06-2011, 01:35 PM   #147
monazEssam
LQ Newbie
 
Registered: Aug 2011
Posts: 22

Rep: Reputation: Disabled
@farab
thanks for your replay, i want u to send me the awk file for computing the average consumption in leach and if you have any other awk scripts on my Email: monaz.essam@gmail.com

also i have another question, I'd like to use some encryption functions from cryptopp library but i can't add it to the NS2, so can anyone plz help me with specified steps what should i do to add this library to ns2?

plzzz if anyone can help, replay me as soon as possible as i need it badly

thanks in advance
 
Old 09-07-2011, 02:57 PM   #148
exidus
LQ Newbie
 
Registered: Jun 2011
Posts: 14

Rep: Reputation: Disabled
@jimctu

I had a problem with energy comsumption too and I have already done changes from deepa too. I found out that if you change .cc or .h file, then it is necessary to do these commands:
make clean
make depend
make

sudo make install

After this you can see changes. I hope that this will be helpful for you.
 
1 members found this post helpful.
Old 09-07-2011, 07:12 PM   #149
jimctu
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Rep: Reputation: Disabled
Thank you Exidus!
forgot the make install...
now it worked perfectly! =D
 
Old 09-09-2011, 02:47 PM   #150
farab
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Rep: Reputation: 22
Quote:
Originally Posted by jimctu View Post
Thank you Exidus!
forgot the make install...
now it worked perfectly! =D
could you please tell me how did you force it to reduce energy comsumption and wich files you edited?
thank you...

Last edited by farab; 09-09-2011 at 03:04 PM.
 
  


Reply

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


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
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:59 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