LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-20-2011, 08:16 PM   #1
adel.elkabbany
LQ Newbie
 
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10

Rep: Reputation: 0
plot the xgraph


dear sir:

how can i plot x graph Ubuntu by using awk scripts indicating how can i change

awk files into xgr files, thanks in advance.

adel
 
Old 03-20-2011, 08:19 PM   #2
adel.elkabbany
LQ Newbie
 
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10

Original Poster
Rep: Reputation: 0
dear sir:

how can i plot x graph on Ubuntu by using awk scripts indicating how can i change

awk files into xgr files, thanks in advance.

adel
linuxubuntu adel.elkabbany is online now Click to check your reputation for this post Edit/Delete Message
 
Old 03-21-2011, 12:18 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

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

The package : sudo apt-get install xgraph

Please have a look into the examples in the xgraph source code :
xgraph-12.1/examples/ \
Animation.xg bar.xg surface2.xg surface3.xg surface.xg xgtest.xg
... to know the possible formatting.
Also, the suffix xg, xgr : Not really required, is just an indicator,
that tells xgraph can run it. Suffix .txt or no suffix will do as well.
Two small examples are attached : data.txt, dropRate.txt.
..
Attached Files
File Type: txt data.txt (654 Bytes, 424 views)
File Type: txt dropRate.txt (208 Bytes, 309 views)
 
1 members found this post helpful.
Old 03-22-2011, 05:53 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
About using awk filters to make xgraph do plots :

Please read this LQ post ( # 4 about ns2 trace files )

http://www.linuxquestions.org/questi...raph-870284/#4

..
 
Old 03-24-2011, 05:41 PM   #5
adel.elkabbany
LQ Newbie
 
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10

Original Poster
Rep: Reputation: 0
xgraph-12.1/examples/
 
Old 03-24-2011, 05:47 PM   #6
adel.elkabbany
LQ Newbie
 
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10

Original Poster
Rep: Reputation: 0
sudo apt-get install xgraph

sudo apt-get install xgraph
 
Old 03-24-2011, 05:51 PM   #7
adel.elkabbany
LQ Newbie
 
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10

Original Poster
Rep: Reputation: 0
sudo apt-get install xgraph(what is this?)
 
Old 03-24-2011, 06:01 PM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
sudo apt-get install xgraph ( what is this ? )
Asking questions about xgraph probably means, you will also want the application.

'sudo apt-get install xgraph' is the command to install the package xgraph.
https://help.ubuntu.com/community/InstallingSoftware
""Ubuntu Documentation: Installing applications.""


xgraph-12.1/examples/ : xgraph_12.1.orig.tar.gz
http://archive.ubuntu.com/ubuntu/poo....1.orig.tar.gz

..
 
Old 04-02-2011, 04:19 AM   #9
adel.elkabbany
LQ Newbie
 
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10

Original Poster
Rep: Reputation: 0
dear sir:
i use ns-2.34 on ubuntu,i want to plot xgraph(throughput,delay,deliver ratio vs time).

when i run avgStats.awk with the command awk -f avgStats.awk avgStats.tr > avgStats.xgr in a terminal,it creates a file avgState.xgr but it's an empty file, i don't know the reason----------------(1)
how i can convert awk file into xgr file?
i use awk files because it include all parameters i want to plot to get the results against time.
according a reply from lq, i put the command:

awk -f avgStats.awk src=2 dst=3 flow=0 pkt=1000 test.tr > stats.out

but it give the below message :

awk: avgStats.awk:4: fatal: cannot open file `test.tr' for reading (No such file or directory)
(it can't read 'test.tr')---------------------------(2)
what i do? thanks in advance------------------------(3)

adel
 
Old 04-02-2011, 05:22 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
'avgStats.awk' is a script, that will write six lines of statistics
from some, not all files.tr. See the file read.me.
The package trace2stats (which means trace to statistics) was shown
as the first hit in a Google search, mainly because it was first.
You are supposed to find / read all other hits yourself.

Also : Read the awk documentation
http://www.chemie.fu-berlin.de/chemn...toc.html#TOC10

If you want to know how plots can be done in ns2, then run the included examples.
1) ns-allinone-2.34/ns-2.34/tcl/ex/wireless-scripts/runall.cmd
2) ns-allinone-2.34/ns-2.34/tcl/ex/red-pd/runall.sh
..... And none of these use xgraph, but gv and gnuplot, to show the result.

.
 
Old 04-06-2011, 11:27 AM   #11
adel.elkabbany
LQ Newbie
 
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10

Original Poster
Rep: Reputation: 0
dear knunfi: thanks a lot for u useful replay and u advise to change to gnuplot, and the question is:

how can i use the awk files(for throughput,delay and delivery ratio ) to show the results graphically with gnuplot? what is the commands?

thanks in advance.

adel
 
Old 04-06-2011, 12:20 PM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
I don't think, you can use "the awk files". Most of the awk scripting
is for a specific trace file. You will simply have to continue your search,
or write a script yourself. Hence the awk documentation link.
And awk scripts are not used, if things are too complex ..
http://www.linuxquestions.org/questi...-awk-870934/#8

Run the examples ns-allinone-2.34/ns-2.34/tcl/ex/wireless-scripts/runall.cmd etc.
to see how things can work.

Other examples
http://www.linuxquestions.org/questi...xgraph-819199/

http://www.linuxquestions.org/questi...ting-818634/#8
..
 
Old 04-08-2011, 09:14 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Some interesting information here : "instantThroughputStll.awk"

http://www.linuxquestions.org/questi...ations-873644/
 
Old 05-04-2011, 11:52 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
More awk scripts ....
http://mohit.ueuo.com/AWK_Scripts.html
> > droppackets.awk totalpacketssent.awk, totalpacketsreceived.awk,
p-d-f.awk instantJitter.awkcwnd.awk

http://mohittahiliani.blogspot.com/2...n-ns-2_06.html

And .. http://www.linuxquestions.org/questi....php?p=4334166
 
  


Reply

Tags
ns2, ns2-awk, ns2-trace, 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
in NS2 DOS and DDoS Simulation +Comparison and Analysis of Xgraph hinatariq Linux - General 31 09-07-2015 12:10 AM
problem in installing "xgraph 12.1" in fedora for ns 2.34 raihana74 Linux - Newbie 29 11-20-2013 10:26 PM
Xgraph designing Abhinay1235 Linux - Networking 1 01-29-2011 12:51 PM
how to use "xgraph" in the scripts shells with ns2.33 in fc9 messy2010 Fedora 1 01-21-2009 03:56 AM
Problem on launching x11 graphical session of nam/ xgraph for NS-2 aboutjeab Linux - Newbie 5 04-21-2008 07:53 AM

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

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