LinuxQuestions.org
Help answer threads with 0 replies.
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 02-27-2014, 10:16 AM   #781
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0

Quote:
Originally Posted by deepa_2111 View Post
If it is not a problem with your OS-ns2 compatibility, please follow the steps in this blog : http://2bytes4u.blogspot.ca/2012/11/...on-ns-234.html.

The author explicitly details the steps to be followed. However, MAKE SURE YOU REPLACE THE PATH WITH YOUR CORRECT PATH. DO NOT BLINDLY DO A COPY-PASTE.
@deepayou provided this time was very helpful... Thanks a lot
but their is one big confusion now that there are two folders in my ns2.34 folder
i.e /mit
and /ns-234-leach/mit
all the above mentioned folders are comprised of the same contents
Can you please tell me exactly which folder to retain and which one to delete
Also leach.err file in /mit folder is showing errors which I was telling you.
and leach.err file in /ns-234-leach/mit folder is showing successful compilation of the program

A big confusion here is which one is useful and to be retained out of abovesaid two folders

the blog
 
Old 02-27-2014, 10:34 AM   #782
Do Tuan Anh
LQ Newbie
 
Registered: Apr 2013
Posts: 4

Rep: Reputation: Disabled
Hi guys,
I installed Leach for ns-2.34 completely and had some files like leach.tr, leach.alive, leach.data, leach.energy, leach.err, leah.out...
Please help me how to plot the energy consumption, node alive of Leach protocol.
Tks alot.
 
Old 02-27-2014, 10:46 AM   #783
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
Creating sensor nodes...
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 (100 == BS)
*** NOTE: no connection pattern specified.
Loading scenario file...


above mentioned is the content of leach.out

Can anybody suuggest me how to use this for result purpose.......

Also as per blog there it is saying to look for leach.tr, can you please tell where this file is to be searched for result purpose.....
 
Old 02-27-2014, 11:38 PM   #784
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
@mittal

leach.tr is in main folder named ns-234-leach
 
Old 02-28-2014, 03:39 AM   #785
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Hello friends

In file ns-mte.tcl
what is the meaning of $self next $args ?

for what $self is used?

what is $self setCode $opt(bsCode)

what is $opt?
what is lindex in these two lines
Code:
set bsx [lindex $bs 0]
  set bsy [lindex $bs 1]
what is r in the following line
Code:
set r [expr $dtobs / 2]
in mte.out
data is always 0.
Then what is the use of this protocol?
No. of nodes alive is decreasing.

what is incircle
Code:
 set incircle [dist $nx $ny $cx $cy]
 
Old 02-28-2014, 05:15 AM   #786
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
# 785 : Mostly basic tcl → Read the tcl documentation.
You can simply use like .. tcl $self next $args .. , etc. etc. as a keyword in Google.
https://www.google.com/webhp?hl=all#...f+next+%24args

http://tmml.sourceforge.net/doc/tcl/next.html
http://tmml.sourceforge.net/doc/tcl/self.html
http://wiki.tcl.tk/10702
http://www.tcl.tk/man/tcl8.4/TclCmd/set.htm

"set incircle [dist $nx $ny $cx $cy]" : The expression `incircle' is defined line 78.

-
 
1 members found this post helpful.
Old 02-28-2014, 09:20 AM   #787
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
Quote:
Originally Posted by Aska123 View Post
@mittal

leach.tr is in main folder named ns-234-leach
@aska

I dont have any file leach.tr in main folder i.e. ns-234-leach
does this means that no proper installation of leach has been achieved
 
Old 02-28-2014, 10:51 AM   #788
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Delete the leach.out, leach.energy, leach.alive and leach.data files in both the folders.
Run the leach simulation again. The folder in which these files are created again is the folder you require.

I would suggest you repeat the entire installation again. It might be confusing to have a path like "ns2.34/ns-234-leach/mit/" but if the installation and execution is successful, then, it's your wish.

Quote:
Originally Posted by mittal_saurabhin View Post
@deepayou provided this time was very helpful... Thanks a lot
but their is one big confusion now that there are two folders in my ns2.34 folder
i.e /mit
and /ns-234-leach/mit
all the above mentioned folders are comprised of the same contents
Can you please tell me exactly which folder to retain and which one to delete
Also leach.err file in /mit folder is showing errors which I was telling you.
and leach.err file in /ns-234-leach/mit folder is showing successful compilation of the program

A big confusion here is which one is useful and to be retained out of abovesaid two folders

the blog
 
Old 02-28-2014, 11:59 AM   #789
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
# 788 .
Quote:
It might be confusing to have a path like "ns2.34/ns-234-leach/mit/"
This structure origins from the "@MayTamer leach package" :
Unpacks to a directory by name "ns-234-leach".

"The other copy" of the MayTamer files, `leach-ns234-patching.tar.gz',
https://drive.google.com/file/d/0B7S...it?usp=sharing
... unpacks to "ns-2.34/" , which is much more convenient :
$ cd ns-allinone-2.34/ && tar xvf leach-ns234-patching.tar.gz
... and all the added files will have the right locations.

-
 
1 members found this post helpful.
Old 02-28-2014, 11:54 PM   #790
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Quote:
Originally Posted by mittal_saurabhin View Post
@aska

I dont have any file leach.tr in main folder i.e. ns-234-leach
when you run leach-setup.sh a folder named ns-234-leach created in the ns-allinone-2.34/ns-2.34 created.

after installation of leach eith ns-allinone



open terminal and go to folder ns-234-leach
do

./leach_test


Now if there is no err in file leach.err (ns-234-leach/mit/leach_sims)

Then a file leach.tr will create in ns-234-leach folder.

Might be you have an error in file leach.err file.
 
Old 03-01-2014, 12:13 AM   #791
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
# 790 .

Well, you can use leach-ns234-patching.tar.gz (#789) :
No "setup" to run : The files already have the correct setup.

-
 
Old 03-01-2014, 02:39 AM   #792
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
ok Knudfi
 
Old 03-02-2014, 02:45 AM   #793
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
hello all..i have one problem..i have two lists and i want to do divide operation on first element of first list and first element of second list and result should b store in third list..as in c lang there is no facility of indexing eg.i in for loop..can anyone tell me how should i do this?
 
Old 03-02-2014, 09:06 AM   #794
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Hello every one
when I run mte algo.
mte.out always has data =0 why?

why it is not showing transfer of data from nodes to Base station?

@Deepa please reply
 
Old 03-02-2014, 11:21 AM   #795
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
@knudfl
@deepa
@Aska

I do not have any leach.tr file available with my PC although successful execution of ./leach_test or ./test has been obtained at terminal.

Can you please guide what can be the reason for .tr file to be missing.

Also I dont have any error shown in leach.err file in /ns-234-leach/mit/leach_sims folder

Last edited by mittal_saurabhin; 03-03-2014 at 09:59 AM.
 
  


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 10:29 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