LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-23-2014, 06:28 AM   #1
Mehedi Hasan
LQ Newbie
 
Registered: Aug 2014
Posts: 11

Rep: Reputation: Disabled
How to edit and save leach_test file in leach protocol?


hello,

I have edited leach_test file and saved
but when i run the leach_test file it makes some error

like cp: command not found

is it possible to edit and save leach_test file?
If yes, how?

thanks
mehedi
 
Old 10-23-2014, 07:50 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
Well, "cp" isn't a tcl / otcl command.

``leach_test´´ is a shell script (bash),
so it all depends how you use 'cp' ?

Editing a text file, and save : Yes, you can do that.
``leach_test´´ : What is it you want to edit ? ?

-
 
Old 10-24-2014, 11:46 PM   #3
Mehedi Hasan
LQ Newbie
 
Registered: Aug 2014
Posts: 11

Original Poster
Rep: Reputation: Disabled
I want to edit num_cluster...

Is it possible?
 
Old 10-25-2014, 05:35 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
← #3 . Well, read the 50 lines. It is still just a text file :

num_clusters=5
 
Old 10-25-2014, 09:27 AM   #5
Mehedi Hasan
LQ Newbie
 
Registered: Aug 2014
Posts: 11

Original Poster
Rep: Reputation: Disabled
I change it.

But it makes the following errors...

ns tcl/ex/wireless.tcl \
-sc mit/uAMPS/sims/nodescen \
-rp $alg \
-x $x \
-y $y \
-nn $nn \
-stop $stop \
-eq_energy $eq_energy \
-init_energy $init_energy \
-filename $filename \
-dirname $dirname \
-topo $topology_file \
-num_clusters $num_clusters \
-bs_x $bs_x \

The above commands are not found...

thanks
 
Old 10-25-2014, 10:36 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
No errors are shown in post #5.

You are showing an exact copy of lines 37 - 50
.. from "leach_test".


HOWTO run a leach simulation :
$ export RCA_LIBRARY=/home/<name>/ns-allinone-2.34/ns-2.34/mit/rca && export uAMPS_LIBRARY=/home/<name>/ns-allinone-2.34/ns-2.34/mit/uAMPS && ./test

-
 
Old 01-23-2015, 03:07 AM   #7
reenkamal
LQ Newbie
 
Registered: Sep 2014
Posts: 14

Rep: Reputation: Disabled
Hello
s 0.000017505 _2_ AGT --- 0 tcp 50 [0 2000000 0 0] ------- [2:0 2147483647:-1 32 0] [0 0] 0 0

we are getting trace like this.In this,i can't even analyze that who is receiving packet. Why Destination address 2147483647:-1 remains same throughout the whole simulation.
 
Old 01-23-2015, 05:55 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
← Post #7, @reenkamal.
Please read :
. http://www.linuxquestions.org/questi...estion.-71791/
. http://www.linuxquestions.org/linux/...Ask_a_Question
. http://linuxsilo.net/docs/smart-questions_en.html

Missing information : What is post #7 about ? ?
Is the line from leach.tr ?
Please show your simulation command.
? Which "patch" did you use for leach ?

Example output files, post #4 here ...
http://www.linuxquestions.org/questi...-4175531395/#4

-

Last edited by knudfl; 01-23-2015 at 05:57 AM.
 
Old 01-23-2015, 11:41 PM   #9
reenkamal
LQ Newbie
 
Registered: Sep 2014
Posts: 14

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
← Post #7, @reenkamal.

-
Yes sir this line is from leach.tr file and the command which i used is ./leach_test.
I used leach+pegasis patch for ns2.34 which you referred to me.
 
  


Reply

Tags
leach, ns2


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
need .cc file for leach protocol urgently manoj robin Linux - Newbie 3 09-21-2014 02:47 AM
How to create a nam file to see the scenario of leach protocol in NS2 ? Mehedi Hasan Linux - Newbie 1 09-01-2014 10:44 AM
problem with running leach protocol in ns2.34 leach.er Mohamed69 Linux - Software 9 04-16-2014 07:10 AM
how to add a nam file on leach protocol khedidja Linux - Software 33 04-11-2014 02:13 PM
How to Generate Nam file for Leach Protocol ? sudheerb Linux - Newbie 3 07-06-2013 01:49 AM


All times are GMT -5. The time now is 02:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration