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 |
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 |
2 Attachment(s)
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. .. |
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 .. |
xgraph-12.1/examples/
|
sudo apt-get install xgraph
sudo apt-get install xgraph
|
sudo apt-get install xgraph(what is this?)
|
Quote:
'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 .. |
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 |
'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. . |
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 |
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 .. |
Some interesting information here : "instantThroughputStll.awk"
http://www.linuxquestions.org/questi...ations-873644/ |
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 |
All times are GMT -5. The time now is 05:57 PM. |