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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-20-2011, 08:16 PM
|
#1
|
LQ Newbie
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10
Rep:
|
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
|
|
|
03-20-2011, 08:19 PM
|
#2
|
LQ Newbie
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10
Original Poster
Rep:
|
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
|
|
|
03-21-2011, 12:18 AM
|
#3
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
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.
..
|
|
1 members found this post helpful.
|
03-22-2011, 05:53 PM
|
#4
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
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
..
|
|
|
03-24-2011, 05:41 PM
|
#5
|
LQ Newbie
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10
Original Poster
Rep:
|
xgraph-12.1/examples/
|
|
|
03-24-2011, 05:47 PM
|
#6
|
LQ Newbie
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10
Original Poster
Rep:
|
sudo apt-get install xgraph
sudo apt-get install xgraph
|
|
|
03-24-2011, 05:51 PM
|
#7
|
LQ Newbie
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10
Original Poster
Rep:
|
sudo apt-get install xgraph(what is this?)
|
|
|
03-24-2011, 06:01 PM
|
#8
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
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
..
|
|
|
04-02-2011, 04:19 AM
|
#9
|
LQ Newbie
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10
Original Poster
Rep:
|
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
|
|
|
04-02-2011, 05:22 AM
|
#10
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
'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.
.
|
|
|
04-06-2011, 11:27 AM
|
#11
|
LQ Newbie
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10
Original Poster
Rep:
|
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
|
|
|
04-08-2011, 09:14 AM
|
#13
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
Some interesting information here : "instantThroughputStll.awk"
http://www.linuxquestions.org/questi...ations-873644/
|
|
|
05-04-2011, 11:52 AM
|
#14
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
|
|
|
All times are GMT -5. The time now is 07:51 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|