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 03-18-2013, 08:01 AM   #16
sweetgrl07
LQ Newbie
 
Registered: Feb 2013
Posts: 9

Rep: Reputation: Disabled

i am using ubuntu 12.04 version
now i hv to delete all the things and make it reinstall again ??
 
Old 03-18-2013, 10:25 AM   #17
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,678

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
# 16 .

If you at some stage used sudo, you will also have to use sudo for deleting:
sudo rm -r ns-allinone-2.34/

Install : Please see post # 10 : No reason to "install ns-2.34",
and then add the pegasis files. Please follow the text :
1) tar xvf ns-allinone-2.34.tar.gz
2) cd ns-allinone-2.34/
3) tar xvf exidus-pegasis-leach-ns234.patch.tar.gz
4) export CC=gcc41 CXX=g++41
5) ./install

Note : The "gcc41 / g++41" packages are mentioned here, post #3 :
http://www.linuxquestions.org/questi...-4175450625/#3
sudo dpkg -i gcc41-compat-4.1.2-ubuntu1210_i386.deb g++41-compat-4.1.2_i386.deb
... Then reboot, and the new compilers can be used.

-
 
Old 03-18-2013, 12:23 PM   #18
D23
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Rep: Reputation: Disabled
thanx a lot its working now.
i want to know how to get correct .nam file for leach
i added following code in WIRELESS.TCL

set nf [open $opt(rp).nam w]
$ns_ namtrace-all-wireless $nf $opt(x) $opt(y)

but in leach.nam file i am getting following output and its not working or showing simulation in nam(just empty window)

V -t * -v 1.0a5 -a 0
W -t * -x 1000 -y 1000
A -t * -n 1 -p 0 -o 0xffffffff -c 31 -a 1
A -t * -h 1 -m 2147483647 -s 0

please tell how to do correct simulation with correct output in leach.nam file asap.
thanx in advance..
 
1 members found this post helpful.
Old 03-18-2013, 01:17 PM   #19
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,678

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
# 18 .

Quote:
Please tell how to do correct simulation with correct output in leach.nam
May be @deepa_2111 can answer your question ..
http://www.linuxquestions.org/questi...68/page29.html
 
Old 03-27-2013, 12:20 AM   #20
D23
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Rep: Reputation: Disabled
hi... i have installed leach on ns-2.34 on ubuntu 12.10 following all steps and it is not giving any error in leach.err but output in leach.out is incomplete as compared to original leach.out please help me. and can u upload original ns-2.34-leach.tar file without any modification in it so it wil give correct leach.out asap.. Thanx in advance
 
Old 03-27-2013, 12:29 AM   #21
sweetgrl07
LQ Newbie
 
Registered: Feb 2013
Posts: 9

Rep: Reputation: Disabled
hii kundlf after installing and then running i got this error how i can resolve it to run leach
@ubuntu:~/ns-allinone-2.34/ns-2.34/leach/tcl/ex$ ns wireless.tcl -x 20 -y 20
num_nodes is set 51
invalid command name "leach-create-mobile-node"
while executing
"leach-create-mobile-node $i"
invoked from within
"if { [string compare $opt(rp) "dsr"] == 0} {
for {set i 0} {$i < $opt(nn) } {incr i} {
dsr-create-mobile-node $i
}
} elseif { [string compare $op..."
(file "wireless.tcl" line 255)
 
Old 03-27-2013, 12:41 AM   #22
D23
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Rep: Reputation: Disabled
hi. i have installed leach on ns-2.34 and it is not giving any error in leach.err but output in leach.out is incomplete as compared to original leach.out. pls help me.also upload ns-2.34-leach.tar file as u hv used so it will not give any incomplete leach.out file as it shows no cluster head adv heard msg and there are no nodes in cluster and each node sends data to bs.there are also only one tdma file no init.energy file present in leach_sims.and all output files are incomplete every.pls help me asap.thanx in advance
 
Old 03-27-2013, 03:08 AM   #23
D23
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Rep: Reputation: Disabled
hi kundlf
my leach.out file is shown as below which gives incomplete output and leach.energy,leach.data are also incomplete leach.out.txt
pls help me and pls upload vali ns-2.34-leach.tar as in case u also have used and which gives all complete files
thanx in advance
 
Old 03-27-2013, 05:11 AM   #24
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,678

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
# 23. There is one source package only, ns-234-leach.tar.gz, post #5 here
http://www.linuxquestions.org/questi...34-a-870368/#5

An edited cmu-trace.h, #9
http://www.linuxquestions.org/questi...ra13-907076/#9

There may be other changes to cmu-trace.h, please read all posts :
http://www.linuxquestions.org/questi...2-34-a-870368/

A different and may be more complete leach ? :
exidus-pegasis-leach-ns234.patch.tar.gz, post #10
http://www.linuxquestions.org/questi...col-937219/#10

-

Last edited by knudfl; 03-27-2013 at 05:13 AM.
 
Old 04-08-2013, 09:36 PM   #25
zafarbit
LQ Newbie
 
Registered: Mar 2012
Location: islamabad
Distribution: ubuntu 12.10
Posts: 3

Rep: Reputation: Disabled
where to add this path

export CC=gcc41 CXX=g++41
 
Old 04-09-2013, 04:00 AM   #26
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,678

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
# 25, @zafarbit.

That's not a path. 'export' is a command.
Just follow the text in post #17.
I.e. type the commands in a terminal.
Like : export CC=gcc41 CXX=g++41 <Enter>

Note : You will of course have to install gcc/g++ version 4.1.2
for the command to work. See answer #2 to @zafarbit here ..
http://www.linuxquestions.org/questi...-4175457165/#2

-
 
Old 04-14-2013, 10:20 AM   #27
littleroot
LQ Newbie
 
Registered: Apr 2013
Posts: 6

Rep: Reputation: Disabled
need your help guys, i have downloaded package exidus-pegasis-leach-ns234.patch.tar.gz by mr knudfl, can you guys teach me how to make it works? step by step?
i've installed ns-allinone-2.34 on ubuntu 10.04 already...what i must do after that? how i can run the pegasis simulation? thank you so much..still newbee here..thank you..email me please..thx

i've installed ns 2.34 in directory :kevin@kevin-laptop:~/ns-allinone-2.34 and i've extracted "exidus-pegasis-leach-ns234.patch.tar.gz" in directory :kevin@kevin-laptop:~/ns-allinone-2.34/ns-2.34, so how can i run the pegasis simulation?

Last edited by littleroot; 04-14-2013 at 10:27 AM.
 
Old 07-17-2013, 01:42 AM   #28
kingrulez
LQ Newbie
 
Registered: Mar 2013
Posts: 18

Rep: Reputation: Disabled
Hi,

Thanks for your valuable suggestions or comments.

I have read all the suggestions regarding the above issue, somehow i managed to clear the errors, still i am getting this, i don't know where was the mistake, unfortunately i could not able to figured it out. Could you please help me to find it out. Please take a look at the below errors.

Error 1: on Ubuntu terminal
@ubuntu:~/ns-allinone-2.34/ns-2.34$ ./leach_test
Usage: tcl/ex/wireless.tcl
mandatory arguments:
[-x MAXX] [-y MAXY]
optional arguments:
[-cp conn pattern] [-sc scenario] [-nn nodes]
[-seed seed] [-stop sec] [-tr tracefile]

Error 2: on leach.err file
./leach_test: line 38: -sc: command not found

Best Regards,
KSR.

Last edited by kingrulez; 07-17-2013 at 05:00 AM.
 
Old 02-15-2014, 06:17 AM   #29
shegxyboy
LQ Newbie
 
Registered: Feb 2014
Posts: 4

Rep: Reputation: Disabled
unable to run leach.nam

Please i have installed leach.patch for ns2.34 after running it, i got leach.out but am unable to run the leach.nam to see the animation, please if there is a way to do it, please help me, am stuck here.....
 
Old 02-15-2014, 06:23 AM   #30
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,678

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
Post # 29, @shegxyboy : Welcome to LQ.

Please read http://www.linuxquestions.org/questions/tags/leach/
And http://www.linuxquestions.org/questions/tags/pegasis/
... And particularly the above post # 19 → @deepa_2111


-
 
  


Reply

Tags
leach, ns2, 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
Leach Protocol for ns2.34 pushpita Linux - Software 36 07-08-2013 04:06 AM
SPIN and LEACH protocol in NS-2 shanky Linux - General 17 05-26-2012 12:03 PM
Leach protocol anitha.r.u Linux - Newbie 16 04-02-2012 04:37 AM
energy in leach protocol !! shanky Linux - Software 1 03-19-2012 06:30 AM
protocol leach ezzati Linux - Newbie 5 05-03-2011 08:42 PM


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