LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-06-2014, 03:52 AM   #1
shwetaam
LQ Newbie
 
Registered: Feb 2014
Posts: 9

Rep: Reputation: Disabled
how to start with Xgraph?


i want to start using XGraph but have no idea from where to start with.
it would be very helpful if i get any pdf which would guide me.
thank you
 
Old 04-06-2014, 05:10 AM   #2
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,397

Rep: Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611
Your other posts are about ns2, so I assume it's about the VINT Xgraph(-12.1).

First thing to do : Install xgraph, preferably as an rpm package.
? Which Fedora version are you using ?
Please also show the output from $ uname -m <Enter>

.. If you already have a functional xgraph executable :
$ cd xgraph-12.1/examples/
$ xgraph Animation.xg
$ xgraph xgtest.xg
... etc. etc.

More examples, etc., post # 195 here :
http://www.linuxquestions.org/questi...26/page13.html

-
 
1 members found this post helpful.
Old 04-10-2014, 12:13 PM   #3
shwetaam
LQ Newbie
 
Registered: Feb 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thank you for your previous reply. It was helpful.
I went through your link & understood xgraph somewhat.
now i want to plot xgraph for my LEACH protocol which is successfully implemented.

i tried writing the following command in the terminal-

xgraph out.tr
(here out.tr is the trace file which is generated after the Leach protocol implementation)

secondly i used the format given in the followinig link
http://computingforbeginners.blogspo...h-in-ns-2.html

but both time i got the same error...
ERROR-
error in file out.tr at line 1,2,3,4...........10000 and it goes on in a infinite loop and doesn't stop.

Please guide me what to do further.
 
Old 04-10-2014, 12:49 PM   #4
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,397

Rep: Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611
# 3 .

Please read the text files xgraph-12.2/examples/ \
{ 1bar Animation.xg bar.xg surface2.xg surface3.xg surface.xg xgtest.xg }
... to know the formatting that's required for xgraph.

* * It is possible to write an awk script or a perl script,
which can sort out the out.tr data into an xgraph usable file.

The only leach plot I have seen, is here, post #425 :
http://www.linuxquestions.org/questi...68/page29.html
... Don't know if it was done with gnuplot, or tkplot, etc.?

EDIT : The above works OK with xgraph :
$ xgraph leach-c.alive.txt
$ xgraph leach.alive.txt
$ xgraph stat-clus.alive.txt
... as three different plots.

-

Last edited by knudfl; 04-10-2014 at 01:02 PM.
 
Old 04-10-2014, 01:27 PM   #5
shwetaam
LQ Newbie
 
Registered: Feb 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thank you for the quick reply.

regarding the awk file...i have also made two awk file for proper sorting out of data.
first file is for average energy consumption which i want to plot on the y axis
second awk file network lifetime in rounds which i want to plot on the x axis

But i am not getting how to proceed further.
shall i run the awk file? if yes, then how to run?
i just knew the procedure till making of awk files but further i dont know how to proceed.
please guide accordingly...thanking you in advance.
 
Old 04-10-2014, 01:41 PM   #6
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,397

Rep: Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611
# 5 .

Example :
X : $ awk -f network-lifetime.awk out.tr > x-data.txt
Y : $ awk -f average-energy.awk out.tr > y-data.txt

-
 
Old 11-25-2015, 12:35 AM   #7
doanhapro
LQ Newbie
 
Registered: Nov 2015
Posts: 8

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 5 .

Example :
X : $ awk -f network-lifetime.awk out.tr > x-data.txt
Y : $ awk -f average-energy.awk out.tr > y-data.txt

-
I have installed leach and leach-c protocol but how to plot graph from leach.alive, leach.energy and leach.data file......
And how to calculate network lifetime and remaining energy for both leach and leach-c protocol.
 
Old 11-25-2015, 12:36 AM   #8
doanhapro
LQ Newbie
 
Registered: Nov 2015
Posts: 8

Rep: Reputation: Disabled
I have installed leach and leach-c protocol but how to plot graph from leach.alive, leach.energy and leach.data file......
And how to calculate network lifetime and remaining energy for both leach and leach-c protocol.
 
Old 11-25-2015, 12:37 AM   #9
doanhapro
LQ Newbie
 
Registered: Nov 2015
Posts: 8

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

Please read the text files xgraph-12.2/examples/ \
{ 1bar Animation.xg bar.xg surface2.xg surface3.xg surface.xg xgtest.xg }
... to know the formatting that's required for xgraph.

* * It is possible to write an awk script or a perl script,
which can sort out the out.tr data into an xgraph usable file.

The only leach plot I have seen, is here, post #425 :
http://www.linuxquestions.org/questi...68/page29.html
... Don't know if it was done with gnuplot, or tkplot, etc.?

EDIT : The above works OK with xgraph :
$ xgraph leach-c.alive.txt
$ xgraph leach.alive.txt
$ xgraph stat-clus.alive.txt
... as three different plots.

-
I have installed leach and leach-c protocol but how to plot graph from leach.alive, leach.energy and leach.data file......
And how to calculate network lifetime and remaining energy for both leach and leach-c protocol.
 
  


Reply

Tags
ns2, xgraph


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
problem with xgraph Makael Linux - Software 9 10-28-2013 08:28 PM
installation in xgraph mrohini Linux - Networking 1 01-21-2013 05:23 AM
Problem with xgraph on NS-2.34 sanaa Linux - Software 1 02-12-2012 08:35 PM
problem in xgraph-12.1 sukrutha Linux - Newbie 1 10-13-2011 01:19 PM
Xgraph designing Abhinay1235 Linux - Networking 1 01-29-2011 01:51 PM

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

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