LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 04-07-2015, 04:24 PM   #1
hassan10
LQ Newbie
 
Registered: Apr 2015
Posts: 12

Rep: Reputation: Disabled
How can i generate a plot from leach.alive ?


Hi.
leach protocol was perfactly installed in ns2.
I run test file test.tcl
the test genarate a file leach.alive but i dont know how to genarate a plot from leach.alive .

Please Help .
----------------------------
leach.alive look like :
-----------------------------------
1.0999999999999999 0 0
1.0999999999999999 1 0
1.0999999999999999 2 0
1.0999999999999999 3 0
1.0999999999999999 4 0
1.0999999999999999 5 0
1.0999999999999999 6 0
1.0999999999999999 7 0
1.0999999999999999 8 0
1.0999999999999999 9 0
1.0999999999999999 10 0
1.0999999999999999 11 0
1.0999999999999999 12 0
1.0999999999999999 13 0
1.0999999999999999 14 0
1.0999999999999999 15 0
1.0999999999999999 16 0
1.0999999999999999 17 0
1.0999999999999999 18 0
1.0999999999999999 19 0
1.0999999999999999 20 0
1.0999999999999999 21 0
1.0999999999999999 22 0
1.0999999999999999 23 0
1.0999999999999999 24 0
1.0999999999999999 25 0
1.0999999999999999 26 0
1.0999999999999999 27 0
1.0999999999999999 28 0
1.0999999999999999 29 0
1.0999999999999999 30 0
1.0999999999999999 31 0
1.0999999999999999 32 0
1.0999999999999999 33 0
1.0999999999999999 34 0
1.0999999999999999 35 0
1.0999999999999999 36 0
1.0999999999999999 37 0
1.0999999999999999 38 0
1.0999999999999999 39 0
1.0999999999999999 40 0
1.0999999999999999 41 0
1.0999999999999999 42 0
1.0999999999999999 43 0
1.0999999999999999 44 0
1.0999999999999999 45 0
1.0999999999999999 46 0
1.0999999999999999 47 0
1.0999999999999999 48 0
1.0999999999999999 49 0
1.0999999999999999 50 0
1.0999999999999999 51 0
1.0999999999999999 52 0
1.0999999999999999 53 0
1.0999999999999999 54 0
1.0999999999999999 55 0
1.0999999999999999 56 0
1.0999999999999999 57 0
1.0999999999999999 58 0
1.0999999999999999 59 0
1.0999999999999999 60 0
1.0999999999999999 61 0
1.0999999999999999 62 0
1.0999999999999999 63 0
1.0999999999999999 64 0
1.0999999999999999 65 0
1.0999999999999999 66 0
1.0999999999999999 67 0
1.0999999999999999 68 0
1.0999999999999999 69 0
1.0999999999999999 70 0
1.0999999999999999 71 0
1.0999999999999999 72 0
1.0999999999999999 73 0
1.0999999999999999 74 0
1.0999999999999999 75 0
1.0999999999999999 76 0
1.0999999999999999 77 0
1.0999999999999999 78 0
1.0999999999999999 79 0
1.0999999999999999 80 0
1.0999999999999999 81 0
1.0999999999999999 82 0
1.0999999999999999 83 0
1.0999999999999999 84 0
1.0999999999999999 85 0
1.0999999999999999 86 0
1.0999999999999999 87 0
1.0999999999999999 88 0
1.0999999999999999 89 0
1.0999999999999999 90 0
1.0999999999999999 91 0
1.0999999999999999 92 0
1.0999999999999999 93 0
1.0999999999999999 94 0
1.0999999999999999 95 0
1.0999999999999999 96 1
1.0999999999999999 97 1
1.0999999999999999 98 1
1.0999999999999999 99 1
 
Old 04-07-2015, 04:50 PM   #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.

The file to use is leach.alive.txt , not leach.alive !
>>> $ xgraph leach.alive.txt


Example, leach.alive.txt :
Code:
10 100
20 96
30 96
40 94
50 94
60 92
70 92
80 92
90 91
100 90
110 90
120 86
130 85
140 84
150 81
160 78
170 77
180 76
190 76
200 75
210 75
220 71
230 71
240 69
250 67
260 64
270 59
280 59
290 55
300 54
310 52
320 51
330 47
340 45
350 41
360 39
370 34
380 31
390 27
400 23
410 22
420 20
430 15
440 14
450 13
460 10
470 8
480 5
484.50000000004167 4
Please use CODE Tags for code : [code]code text[/code]
( The # button in the 'Advanced Editor'.)


-

Last edited by knudfl; 04-07-2015 at 04:55 PM.
 
Old 04-07-2015, 07:24 PM   #3
hassan10
LQ Newbie
 
Registered: Apr 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Welcome to LQ.

The file to use is leach.alive.txt , not leach.alive !
>>> $ xgraph leach.alive.txt


Example, leach.alive.txt :
Code:
10 100
20 96
30 96
40 94
50 94
60 92
70 92
80 92
90 91
100 90
110 90
120 86
130 85
140 84
150 81
160 78
170 77
180 76
190 76
200 75
210 75
220 71
230 71
240 69
250 67
260 64
270 59
280 59
290 55
300 54
310 52
320 51
330 47
340 45
350 41
360 39
370 34
380 31
390 27
400 23
410 22
420 20
430 15
440 14
450 13
460 10
470 8
480 5
484.50000000004167 4
Please use CODE Tags for code : [code]code text[/code]
( The # button in the 'Advanced Editor'.)


-
Thinks for informations but when i do the commande $xgraphe leach.live.txt (my context of leach.alive.txt has 3 parametrers )
Code:
1.0999999999999999 0 0
1.0999999999999999 1 0
1.0999999999999999 2 0
1.0999999999999999 3 0
1.0999999999999999 4 0
1.0999999999999999 5 0
1.0999999999999999 6 0
1.0999999999999999 7 0
1.0999999999999999 8 0
1.0999999999999999 9 0
1.0999999999999999 10 0
1.0999999999999999 11 0
1.0999999999999999 12 0
1.0999999999999999 13 0
should i delete the first parametre to keep 2 parametres?
thinks
 
Old 04-08-2015, 01:15 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.

! Please do not quote entire posts. A "one word reference" will do.

Your 'leach.live.txt' is quite different from my result.
Probably because you are using a late OS.
An old OS will create better LEACH outputs.


-
 
Old 04-09-2015, 08:13 AM   #5
hassan10
LQ Newbie
 
Registered: Apr 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Re #3.

-
hi

i use Ubuntu 12.10
 
Old 04-28-2015, 06:51 AM   #6
hassan10
LQ Newbie
 
Registered: Apr 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
Re #4
Hi
Please Help me,witch Release of ubuntu do you advise me
witch one of these ?
Ubuntu 4.10 (Warty Warthog)
Ubuntu 5.04 (Hoary Hedgehog)
Ubuntu 5.10 (Breezy Badger)
Ubuntu 6.06.2 LTS (Dapper Drake)
Ubuntu 6.10 (Edgy Eft)
Ubuntu 7.04 (Feisty Fawn)
Ubuntu 7.10 (Gutsy Gibbon)
Ubuntu 8.04.4 LTS (Hardy Heron)
Ubuntu 8.10 (Intrepid Ibex)
Ubuntu 9.04 (Jaunty Jackalope)
Ubuntu 9.10 (Karmic Koala)
Ubuntu 10.04.4 LTS (Lucid Lynx)
Ubuntu 10.10 (Maverick Meerkat)
Ubuntu 11.04 (Natty Narwhal)
Thinks

Last edited by hassan10; 04-28-2015 at 06:53 AM.
 
Old 04-28-2015, 06:59 AM   #7
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 #6.

The best plot results, etc. was with a discontinued PCLinuxOS (2012.08 ?).

The current recommendation is the 32bits CentOS 6.x
http://ftp.funet.fi/pub/mirrors/cent...6-bin-DVD1.iso
>>> 'CentOS-6.6-i386-bin-DVD1.iso'.

Now and then I do tests with other Linux OS`s to find a better choice for LEACH.
... But so far none have shown any improvement over CentOS.

-
 
Old 04-28-2015, 07:04 PM   #8
hassan10
LQ Newbie
 
Registered: Apr 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
Re #7
thank you sir for you Response .
i want to change the algorithme of leach in ns2 (change the interval of rundom number [0 1] that it used to select a CH ), witch file i should change .
thank you a lot
 
  


Reply

Tags
leach, 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
how obtained total alive=0 at the end of simulation leach in ns2 bayefalle Linux - Software 0 03-13-2015 07:48 PM
How to plot graph for leach protocol? Aska123 Linux - Networking 2 01-14-2014 06:59 AM
How to extract information from NS-2 Leach trace files and plot a graph? doussa Linux - Newbie 3 03-24-2013 04:07 AM
How to generate a graphical plot of a tree data structure Daravon Programming 2 02-25-2013 09:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:01 AM.

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