LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 04-20-2017, 08:55 AM   #1
hassanzeb
LQ Newbie
 
Registered: Apr 2017
Posts: 6

Rep: Reputation: Disabled
Leach protocol in grahical view just like NAM


I have installed leach 2.35 and now how to simulate the nodes just like NAM. and how to compare leach and leach-c .out in xgraph
 
Old 04-20-2017, 09:35 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

Script, leach__nodes-alive.awk post #9 here
http://www.linuxquestions.org/questi...gy-4175556129/
Files for xgraph, examples
1. $ awk -f leach__nodes-alive.awk leach.alive >> leach.alive.txt
2. $ awk -f leach__nodes-alive.awk leach-c.alive >> leach-c.alive.txt

$ xgraph leach.alive.txt leach-c.alive.txt -bg white &


Other scripts : leach_energy1.awk, leach_energy2.awk
http://blog.csdn.net/delphiwcdj/article/details/6033459


-

Last edited by knudfl; 04-24-2017 at 03:29 AM.
 
Old 04-21-2017, 12:10 AM   #3
hassanzeb
LQ Newbie
 
Registered: Apr 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you sir for your quick replye

i have used the following steps

1. i have downloaded leach__nodes-alive.awk.txt and put in home directory
2. i have downloaded leach_ns235_Oct2015.tar.gz and leach_ns235-Jun2015.patch
3. i have follow your instructions
$ cd ns-allinone-2.35/
$ tar xvf leach_ns235_Oct2015.tar.gz
( Or : $ patch -p0 < leach_ns235-Jun2015.patch )
$ ./install
$ cd ns-2.35/
$ sudo make install
$ ./leach_test
4. cd mit/leach_sims/gedit leach.out show the result total energy 2.63 but still unable to generate xgraph and simulation of nodes.
what i do next as i am newbie.
 
Old 04-21-2017, 07:57 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #3, Did you remember editing the 25 lines : from "pradeepkumar" to "your user name" ?
http://www.linuxquestions.org/questi...4175556129/#11


Generating Xgraph files : $ cd mit/leach_sims/
$ awk -f leach__nodes-alive.awk leach.alive >> leach.alive.txt
$ awk -f leach__nodes-alive.awk leach-c.alive >> leach-c.alive.txt
$ awk -f leach_energy1.awk leach.energy >> leach.energy.txt
$ awk -f leach_energy2.awk leach.energy >> 2leach.energy.txt

$ xgraph leach.alive.txt leach-c.alive.txt -bg white &
$ xgraph leach.energy.txt &
$ xgraph 2leach.energy.txt &


? What's your issues ? Did you install the 'xgraph' package ?
... Which Linux OS are you using ?


-
 
1 members found this post helpful.
Old 04-24-2017, 01:32 AM   #5
hassanzeb
LQ Newbie
 
Registered: Apr 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
Smile Its Work but Little problem with leach-c and energy1,2 and need more help

Quote:
Originally Posted by knudfl View Post
Re #3, Did you remember editing the 25 lines : from "pradeepkumar" to "your user name" ?
http://www.linuxquestions.org/questi...4175556129/#11


Generating Xgraph files : $ cd mit/leach_sims/
$ awk -f leach__nodes-alive.awk leach.alive >> leach.alive.txt
$ awk -f leach__nodes-alive.awk leach-c.alive >> leach-c.alive.txt
$ awk -f leach_energy1.awk leach.energy >> leach.energy.txt
$ awk -f leach_energy2.awk leach.energy >> 2leach.energy.txt

$ xgraph leach.alive.txt leach-c.alive.txt -bg white &
$ xgraph leach.energy.txt &
$ xgraph 2leach.energy.txt &


? What's your issues ? Did you install the 'xgraph' package ?
... Which Linux OS are you using ?

-
Thanks sir its work but Little Problem the xgraph not showing the green line i.e. leach-c and shows the file not found for energy1.awk
And Please also your advise needed strongly, how to change the node energy with 2 energy level in leach, one each CH contain 10j energy and other nodes contain 2j energy for static nodes. Next Important question in which files can i modified leach i mean that want to change the algorithm of leach with another algorithm

Last edited by hassanzeb; 04-24-2017 at 01:36 AM.
 
Old 04-24-2017, 03:28 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #4 : Please do not quote entire posts. A "one word reference" will do.


Quote:
leach-c and shows the file not found for energy1.awk
I guess you yourself would know where you have saved energy1.awk ...
... May be rename to energy1.awk, if the naming differs.
 
Old 04-24-2017, 03:38 AM   #7
hassanzeb
LQ Newbie
 
Registered: Apr 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks you so much sir, sir i suggest if you implement any 2016-17 research paper in NS2,3 step by step for all beginners then this will helped the newbie very much for understanding also for me.
 
  


Reply

Tags
leach ns235, ns2



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
problem with running leach protocol in ns2.34 leach.er Mohamed69 Linux - Software 14 04-16-2018 07:10 AM
nam of leach protocol not complete walaa_ali22 Linux - Newbie 1 05-04-2015 09:42 AM
How to create a nam file to see the scenario of leach protocol in NS2 ? Mehedi Hasan Linux - Newbie 1 09-01-2014 09:44 AM
how to add a nam file on leach protocol khedidja Linux - Software 33 04-11-2014 01:13 PM
How to Generate Nam file for Leach Protocol ? sudheerb Linux - Newbie 3 07-06-2013 12:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

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