LinuxQuestions.org
Visit the LQ Articles and Editorials section
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-09-2011, 03:07 PM   #151
jimctu
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Rep: Reputation: Disabled

Quote:
Originally Posted by farab View Post
could you please tell me how did you force it to reduce energy comsumption and wich files you edited?
thank you...
Here: http://www.linuxquestions.org/questi...2-34-a-860250/
Post #13
 
Old 09-10-2011, 10:10 AM   #152
monazEssam
LQ Newbie
 
Registered: Aug 2011
Posts: 22

Rep: Reputation: Disabled
Quote:
Originally Posted by exidus View Post
@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.

when i run make depend this error is appears:
make: *** No rule to make target `tcp/linux/tcp_naivereno.cc', needed by `depend'. Stop.

what can i do?
 
Old 09-10-2011, 11:47 AM   #153
jimctu
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Rep: Reputation: Disabled
Quote:
Originally Posted by monazEssam View Post
when i run make depend this error is appears:
make: *** No rule to make target `tcp/linux/tcp_naivereno.cc', needed by `depend'. Stop.

what can i do?
it happened to me too, but i've done the rest without solving this issue and it worked...
 
Old 09-11-2011, 01:59 AM   #154
farab
LQ Newbie
 
Registered: Aug 2011
Posts: 17

Rep: Reputation: 22
Quote:
Originally Posted by jimctu View Post
I reduced total energy to max 200.
but something is wrong. nodes start dying very soon. take a look at my result, where the blue line is LEACH and the red one is LEACH-C.
anyone can explain this difference between my result and wendi?
 
Old 09-11-2011, 08:22 AM   #155
monazEssam
LQ Newbie
 
Registered: Aug 2011
Posts: 22

Rep: Reputation: Disabled
Quote:
Originally Posted by farab View Post
@ 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.
i did these changes beside deepa changes for energy consumption but i had the following warnings in leach.out:

Warning! 39: Cannot receive while transmitting.
I can hear 9 different packets ==> collision.
COLLISION!!!! rx_state_ = 0

can you help me in resolving these warnings?
 
Old 09-11-2011, 08:46 AM   #156
monazEssam
LQ Newbie
 
Registered: Aug 2011
Posts: 22

Rep: Reputation: Disabled
Del

Last edited by monazEssam; 09-12-2011 at 01:25 AM. Reason: the question is cancelled
 
Old 09-12-2011, 12:42 AM   #157
monazEssam
LQ Newbie
 
Registered: Aug 2011
Posts: 22

Rep: Reputation: Disabled
Quote:
Originally Posted by exidus View Post
@monazEssam

1. Main output file is leach.out. There are information about which file is a cluster head, which node send a message etc. You can see total spend energz at the end of file. Can you check a number of total energy at the end of simulation when you simulate 100 nodes?

2. If you want to add security to leach packets, I think that a good place for it will be a files mit/rca/rcagent.cc and mit/uAMPS/bsagent.cc. There are function for sending and receiving packets. But I am not sure if my idea is correct.

3. Trace file is for leach_test file is leach.tr in ns-2.34 directory. I think that nam file is not created for leach_test.
I have another question so urgent to me to know. how many bytes are the data size of leach packets?
i mean for example in rcagent.cc (located in ns-2.34/mit/RCA)there are receive and send functions taking in their parameters the data size, i'd like to know the value passed to these functions in this variables when these functions are called? or how many bytes are the meta_data of leach messages?

can anyone help me?

Last edited by monazEssam; 09-12-2011 at 06:14 AM.
 
Old 09-12-2011, 01:15 AM   #158
monazEssam
LQ Newbie
 
Registered: Aug 2011
Posts: 22

Rep: Reputation: Disabled
Quote:
Originally Posted by exidus View Post
@monazEssam

1. Main output file is leach.out. There are information about which file is a cluster head, which node send a message etc. You can see total spend energz at the end of file. Can you check a number of total energy at the end of simulation when you simulate 100 nodes?

2. If you want to add security to leach packets, I think that a good place for it will be a files mit/rca/rcagent.cc and mit/uAMPS/bsagent.cc. There are function he new for sending and receiving packets. But I am not sure if my idea is correct.

3. Trace file is for leach_test file is leach.tr in ns-2.34 directory. I think that nam file is not created for leach_test.
how can i edit the leach_test and/or wireless.tcl (located in tcl/ex) to make it produce a nam file and use trace format for the trace file?

i tried these lines in wireless.tcl file ( at main program/Initialize Global Variables section)
Code:
set tracefd	[open leach.tr w]
set namtrace    [open leach.nam w]
$ns_ trace-all $tracefd
$ns_ namtrace-all-wireless $namtrace 500 500
# use new trace file format
$ns_ use-newtrace
with no use, the trace file (leach.tr) is still produced in old format and the nam file is produced empty!!
so can anyone help me plz? i know i push many questions to you but it's because i have to finish this part by the end of this week for my master thesis deadlines? so plz bear me and support me

Last edited by monazEssam; 09-12-2011 at 01:17 AM.
 
Old 09-14-2011, 06:04 AM   #159
monazEssam
LQ Newbie
 
Registered: Aug 2011
Posts: 22

Rep: Reputation: Disabled
Dears,
why you are not replaying me i need your help
i have more questions:
1- are there any connection pattern used for "LEACH", i noticed in wireless.tcl that the connection pattern is empty? if there are a connection pattern for leach, so where is it defined? and if not exist, how the connection between the nodes is defined
2- where is the configuration of the traffic ? is it TCP or CBR? if it a CBR, what its specification?

3- what is the mac protocol used? is it mac802_11 or the mac of sensor networks thats sensor (15.3)?

please help me i need it badly
 
Old 09-14-2011, 01:49 PM   #160
jimctu
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Rep: Reputation: Disabled
I`m still getting some troubles with leach-c
when I change the leach-c algorithm on leach_test, i`m still getting 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)
anyone know how to solve this? as my previous post, I think I already fixed it, by changing the variable to its path, i`ve done all the makes exidus suggested, but I keep getting this error. It only happens in leach-c. Leach works perfectly!

Last edited by jimctu; 09-14-2011 at 02:01 PM.
 
Old 09-14-2011, 02:52 PM   #161
farab
LQ Newbie
 
Registered: Aug 2011
Posts: 17

Rep: Reputation: 22
guys it seems leach protocol dont work well on ns2.34
there is much differences in results and its hard to setup completly.
I suggest to try leach on ns2.1b or ns2.27.
I have solved all your errors above. but the final result is not satsifying...
now Im trying to install earlier versions of ns.
 
Old 09-15-2011, 01:11 AM   #162
farab
LQ Newbie
 
Registered: Aug 2011
Posts: 17

Rep: Reputation: 22
Quote:
Originally Posted by jimctu View Post
I`m still getting some troubles with leach-c
when I change the leach-c algorithm on leach_test, i`m still getting 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)
anyone know how to solve this? as my previous post, I think I already fixed it, by changing the variable to its path, i`ve done all the makes exidus suggested, but I keep getting this error. It only happens in leach-c. Leach works perfectly!
I have answered you in your email.
 
Old 09-15-2011, 08:00 AM   #163
monazEssam
LQ Newbie
 
Registered: Aug 2011
Posts: 22

Rep: Reputation: Disabled
dears,
I want to know the total energy produced at the end of the leach.out file is the total energy remaining in the system or the total energy consumed so if it's 197 it means the remaining energy at network is 3j?
 
Old 09-15-2011, 08:16 AM   #164
jimctu
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Rep: Reputation: Disabled
Quote:
Originally Posted by farab View Post
I have answered you in your email.
Thanks farab, but I've change the variable name for its path and even though the variable does not exists anymore, if I run the leach_test again, it keeps showing the same error, as if I never changed nothing.

And Monaz, that's the total energy consumed by the network during the simulation. So you are right, if it consumes 197J, it will only remains 3J
 
Old 09-15-2011, 08:30 AM   #165
monazEssam
LQ Newbie
 
Registered: Aug 2011
Posts: 22

Rep: Reputation: Disabled
put it means that the power consumption of the leach is too large, as the smallest value i have in the total energy is 196 it means that the power consumption is 196/200 = 98% !! , is it right?and if right why?
 
  


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


All times are GMT -5. The time now is 07:36 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration