LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   how to implement leach in ns2.34 in fedora13 (https://www.linuxquestions.org/questions/linux-wireless-networking-41/how-to-implement-leach-in-ns2-34-in-fedora13-907076/)

knudfl 07-31-2013 04:40 AM

Post #30, @gunjan9876 : Welcome to LQ.

Please read posts #9, #11 : Use the script "leach-HOME-setup234.sh"
.. to setup /home/<name>/ns-allinone-2.34/ .
Post #9 : Please use the new file ns-2.34/trace/cmu-trace.h

Compilers for Ubuntu 12.04, 32bits:i686 , post # 47 here
http://www.linuxquestions.org/questi...532/page4.html
( You can check if you have the recommended architecture "i686"
with the command $ uname -m <Enter> ).

-

gunjan9876 08-04-2013 05:29 AM

Post#31, @knudfl

Thanks for replying...it helped me
i followed d steps ....but now when i run ./test command it gives me following error:

bash: ./test : Permission denied

Please sugggest me what to do...

the output of the command "uname -m" is i686

knudfl 08-04-2013 07:29 AM

# 32 .

"./test : Permission denied" : 'test' may not be set as executable.

How to run a shell (bash) script in Ubuntu : $ bash test

Or make the script executable : $ chmod +x test
... Then you can do $ ./test

-

gunjan9876 08-04-2013 11:22 AM

Quote:

Originally Posted by knudfl (Post 5002576)
# 32 .

"./test : Permission denied" : 'test' may not be set as executable.

How to run a shell (bash) script in Ubuntu : $ bash test

Or make the script executable : $ chmod +x test
... Then you can do $ ./test

-


It worked...
Thank you.!!! ...

Shivjay 08-08-2013 05:35 AM

Dear Users,
I have already patch leach in my ns-2.34 over fedora-16. But got this error.
see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Phy/WirelessPhy::Efriss_amp_

warning: no class variable Phy/WirelessPhy::Etwo_ray_amp_

warning: no class variable Phy/WirelessPhy::EXcvr_

warning: no class variable Phy/WirelessPhy::sleep_

warning: no class variable Phy/WirelessPhy::ss_

warning: no class variable Phy/WirelessPhy::dist_

warning: no class variable Phy/WirelessPhy::alive_

Loading connection pattern...
Loading scenario file...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 89.8
SORTING LISTS ...DONE!
NS EXITING...
bash-4.2$

Another thing wgen i run ./test file i got learch.tr also and got result files and all file looks like actual result file.
conditions.txt leach.data leach.out leach save 3 startup.energy
leach4 leach.energy leach.save1 Result1 TDMAschedule.0.txt
leach.alive leach.err leach.save2 Result.out

But when i read leach.tr then i got some unexpected result that's trace formate given below:
:
:
:
s 0.000079542 _90_ AGT --- 0 tcp 12345 [0 5a000000 0 0] ------- [90:0 2147483647:0 32 0] [0 0] 0 0
s 0.000093514 _47_ AGT --- 1 tcp 14132 [0 2f000000 0 0] ------- [47:0 2147483647:0 32 0] [0 0] 0 0
s 0.000123542 _87_ AGT --- 2 tcp 14136 [0 57000000 0 0] ------- [87:0 2147483647:0 32 0] [0 0] 0 0
s 0.000139659 _8_ AGT --- 3 tcp 56 [0 8000000 0 0] ------- [8:0 2147483647:0 32 0] [0 0] 0 0
s 0.000155049 _97_ AGT --- 4 tcp 14137 [0 61000000 0 0] ------- [97:0 2147483647:0 32 0] [0 0] 0 0
s 0.000165083 _21_ AGT --- 5 tcp 12594 [0 15000000 0 0] ------- [21:0 2147483647:0 32 0] [0 0] 0 0
s 0.000181912 _23_ AGT --- 6 tcp 13106 [0 17000000 0 0] ------- [23:0 2147483647:0 32 0] [0 0] 0 0
s 0.000195106 _38_ AGT --- 7 tcp 14387 [0 26000000 0 0] ------- [38:0 2147483647:0 32 0] [0 0] 0 0
s 0.000211702 _13_ AGT --- 8 tcp 13105 [0 d000000 0 0] ------- [13:0 2147483647:0 32 0] [0 0] 0 0
s 0.004872214 _71_ AGT --- 808333344 audio 740307255 [0 47000000 0 0] ------- [71:0 2147483647:0 32 0]
s 0.004874591 _31_ AGT --- 808333344 audio 740307251 [0 1f000000 0 0] ------- [31:0 2147483647:0 32 0]
s 0.004958706 _37_ AGT --- 808333344 audio 740308787 [0 25000000 0 0] ------- [37:0 2147483647:0 32 0]
s 0.005046812 _5_ AGT --- 808463920 audio 539762741 [0 5000000 0 0] ------- [5:0 2147483647:0 32 0]
s 0.005048750 _15_ AGT --- 808333344 audio 740308273 [0 f000000 0 0] ------- [15:0 2147483647:0 32 0]
:
:
:
:
:
:
s 0.014223985 _77_ AGT --- 808333344 audio 740308791 [0 4d000000 0 0] ------- [77:0 2147483647:0 32 0]
s 0.014230481 _55_ AGT --- 808333344 audio 740308277 [0 37000000 0 0] ------- [55:0 2147483647:0 32 0]
s 0.014384279 _45_ AGT --- 808333344 audio 740308276 [0 2d000000 0 0] ------- [45:0 2147483647:0 32 0]
s 0.014451525 _3_ AGT --- 808463920 audio 539762739 [0 3000000 0 0] ------- [3:0 2147483647:0 32 0]
s 0.014565483 _70_ AGT --- 808333344 audio 740306999 [0 46000000 0 0] ------- [70:0 2147483647:0 32 0]
r 0.099049563 _7_ AGT --- 0 tcp 12345 [0 5a000000 ffff0008 0] ------- [90:0 2147483647:0 32 0] [0 0] 1 0
r 0.099049568 _77_ AGT --- 0 tcp 12345 [0 5a000000 ffff0008 0] ------- [90:0 2147483647:0 32 0] [0 0] 1 0
r 0.099049572 _8_ AGT --- 0 tcp 12345 [0 5a000000 ffff0008 0] ------- [90:0 2147483647:0 32 0] [0 0] 1 0
r 0.099049581 _81_ AGT --- 0 tcp 12345 [0 5a000000 ffff0008 0] ------- [90:0 2147483647:0 32 0] [0 0] 1 0
r 0.099049582 _29_ AGT --- 0 tcp 12345 [0 5a000000 ffff0008 0] ------- [90:0 2147483647:0 32 0] [0 0] 1 0:
:
:
:
:
:
:
:
Please give me some idea about what is this problem and why this is?
How can i remove this in my ns-2.34

Thanks in Advance...

knudfl 08-10-2013 05:09 AM

# 35 .

Ref. your text here http://network-simulator-ns-2.7690.n...28.html#a27460
Quote : ""I have already patch leach routing protocol in my ns-2.34 ...
fedora and make some changes according to my requirement.""

Which changes would that be ? And where does the "audio" come from ?
Code:

s 0.004872214 _71_ AGT --- 808333344 audio 740307255 [0 47000000 0 0] ------- [71:0 2147483647:0 32 0]
s 0.004874591 _31_ AGT --- 808333344 audio 740307251 [0 1f000000 0 0] ------- [31:0 2147483647:0 32 0]
s 0.004958706 _37_ AGT --- 808333344 audio 740308787 [0 25000000 0 0] ------- [37:0 2147483647:0 32 0]
s 0.005046812 _5_ AGT --- 808463920 audio 539762741 [0 5000000 0 0] ------- [5:0 2147483647:0 32 0]
s 0.005048750 _15_ AGT --- 808333344 audio 740308273 [0 f000000 0 0] ------- [15:0 2147483647:0 32 0]
:
:
s 0.014223985 _77_ AGT --- 808333344 audio 740308791 [0 4d000000 0 0] ------- [77:0 2147483647:0 32 0]
s 0.014230481 _55_ AGT --- 808333344 audio 740308277 [0 37000000 0 0] ------- [55:0 2147483647:0 32 0]

Example "a normal leach.tr" https://docs.google.com/file/d/0B7S2...it?usp=sharing

Errors / problems ? I don't see any.
If you want a default LEACH setup, you can just set up another ns-allinone-2.34/
in a new directory. You can have as many ns-allinone as you want at the same time.
( But do not add any path text to .bashrc ).

The suggested latest leach patching is exidus-pegasis_ns-234-leach.tar.gz
https://docs.google.com/file/d/0B7S2...it?usp=sharing
Info #289 http://www.linuxquestions.org/questi...68/page20.html
And : http://www.linuxquestions.org/questions/tags/pegasis/

-

Bader Sadij 11-24-2013 02:14 AM

Avoid NS
 
I strongly suggest you drop NS and move to a different simulator. I have tried working on NS 2 for the last six months and have completely given up. After resolving one bug I find that I have to spend my time in resolving a new one.
All my time is spent in understanding NS 2 rather than on working on my new algorithm :(

knudfl 11-24-2013 09:51 AM

Post # 37, @Bader Sadij : Welcome to LQ.

As you can see from the the other "3,000" ns2 posts,
bugs are a rare situation.
One or two of the additional protocol patches have bugs.

The most common issues are caused by using the wrong compiler.
ns-2.35 : Use gcc / g++ version 4.4* .
ns-2.26 ... 2.34 : Use gcc/g++ version 4.1.2, or 3.4.6 .
One of those versions are available for all common Linux OS.

-


All times are GMT -5. The time now is 05:37 AM.