Linux - NewbieThis 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.
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,298
Rep:
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.
..
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: 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)
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,298
Rep:
'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.
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.
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,298
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.