LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-22-2011, 12:46 PM   #1
tootz
Member
 
Registered: Feb 2011
Posts: 47

Rep: Reputation: 1
plot trace file into a graph


how do i plot the trace file into a graph? can any 1 show an example here? just any trace file will do, thanks
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-22-2011, 12:49 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,145
Blog Entries: 1

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
What kind of trace file?

What kind of graph?
 
Old 03-22-2011, 12:52 PM   #3
tootz
Member
 
Registered: Feb 2011
Posts: 47

Original Poster
Rep: Reputation: 1
wireless adhoc network simulation .tr file and plotting Network throughput vs time.
please advice
 
Old 03-22-2011, 01:38 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,625

Rep: Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529
Network simulator ns2 : "Trace file" ( file.tr )

AFAIK, you can use some awk scripts, to filter the trace files,
making it possible for e.g. xgraph to handle the filtered output.
( sudo apt-get install xgraph ).

Some may be included in ns-2.xx. ( find ns-2.xx/ -name "*awk*" ).

And Google will find some ( keyword = .. wireless adhoc network ns2 awk ..)
First hit http://www.cse.msu.edu/~wangbo1/ns2/
> > http://www.tlc-networks.polito.it/fiore/ > trace2stats
>>> http://www.tlc-networks.polito.it/fi...stats_v05b.tgz
trace2stats : is a set of AWK scripts to get node-to-node statistics
from the tracefiles generated by the ns-2 network simulator.

Also suggest : Run some of the included simulations, that have a runall* script.
Example tcl/ex/wireless-scripts/ , and tcl/ex/red-pd/ .
red-pd/ runall.sh : The simulation will run for four hours. gv + gnuplot required.

..

Last edited by knudfl; 03-22-2011 at 01:58 PM.
 
2 members found this post helpful.
Old 03-23-2011, 08:54 AM   #5
tootz
Member
 
Registered: Feb 2011
Posts: 47

Original Poster
Rep: Reputation: 1
thanks alot knudfl! have u plot a graph similiar to
http://ethesis.nitrkl.ac.in/1131/1/bikas.pdf

Fig 5.2 end-to-end delay verses pause time

how to plot to this extend?
coz the awk only plots 1 to 1 node
 
Old 03-24-2011, 06:52 PM   #6
adel.elkabbany
LQ Newbie
 
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10

Rep: Reputation: 0
dear sir:

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. can u help me?
how i can convert awk file into xgr file?
adel

Last edited by adel.elkabbany; 03-24-2011 at 06:57 PM. Reason: i forget somthing.
 
Old 03-25-2011, 07:28 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,625

Rep: Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529
#6 :
From trace2stats/read.me :
Usage (from shell): 'awk -f avgStats.awk <values> <tracefile>'
Usage example: 'awk -f avgStats.awk src=2 dst=3 flow=0 pkt=1000 test.tr > stats.out'

You are mising <values>. Also : You are probably also missing a file.tr.

The awk files are filters used to convert <your-file.tr> to a format readable
by a plot application.
( Except avgStats.awk, etc.: Is for statistics only, see read.me.)

Quote:
How I can convert awk file into xgr file ?
You can't. file.tr can be filtered by an awk script, e.g. avgStats.awk.
And don't use ".xgr". No extension is required.
http://www.linuxquestions.org/questi...raph-869865/#3
..

Last edited by knudfl; 03-25-2011 at 01:29 PM.
 
Old 03-25-2011, 11:19 AM   #8
tootz
Member
 
Registered: Feb 2011
Posts: 47

Original Poster
Rep: Reputation: 1
knudfl,

same as adel.elkabbany, i do not have any output at all
i have input in the terminal "awk -f avgStats.awk src=0 dst=1 flow=0 pkt=512 694demo.tr > stats.out"
here is my traffic scenario and movement:

$node_(0) set X_ 60.887691232990
$node_(0) set Y_ 468.338850695752
$node_(0) set Z_ 0.000000000000
$node_(1) set X_ 59.887691232990
$node_(1) set Y_ 468.338850695752
$node_(1) set Z_ 0.000000000000
$god_ set-dist 0 1 16777215
$ns_ at 2.000000000000 "$node_(0) setdest 465.161166257114 404.493073067758 0.132122982638"
$ns_ at 2.000000000000 "$node_(1) setdest 465.068875749206 404.508644879283 1.584571194274"
$ns_ at 188.869624289405 "$node_(1) setdest 443.068875749206 638.508644879283 0.000000000000"
$ns_ at 190.869624289405 "$node_(1) setdest 23.592571932183 257.567439254845 0.289996528141"

set udp_(0) [new Agent/UDP]
$ns_ attach-agent $node_(0) $udp_(0)
set null_(0) [new Agent/Null]
$ns_ attach-agent $node_(1) $null_(0)
set cbr_(0) [new Application/Traffic/CBR]
$cbr_(0) set packetSize_ 512
$cbr_(0) set interval_ 4.0
$cbr_(0) set random_ 1
$cbr_(0) set maxpkts_ 10000
$cbr_(0) attach-agent $udp_(0)
$ns_ connect $udp_(0) $null_(0)
$ns_ at 1.6686187217331572 "$cbr_(0) start"

can u advice?thanks alot!

Last edited by tootz; 03-25-2011 at 11:21 AM.
 
Old 03-25-2011, 12:27 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,625

Rep: Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529
avgStats.awk: Is for statistics only, see read.me line 41..55.

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

will output a statistics file, 18 lines, but statistics lines have "values" = 0.
 
Old 03-25-2011, 01:04 PM   #10
tootz
Member
 
Registered: Feb 2011
Posts: 47

Original Poster
Rep: Reputation: 1
it mention statictics, but i sld at least have a value coz i transmitted some stuff. am i correct?sldnt be value 0, did i input something wrongly? i need to know the stats so that i can plot.
 
Old 03-26-2011, 04:52 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,625

Rep: Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529
Google .. ns2 awk filters ..

http://www.google.com/webhp#sclient=...cf11f17933379c


http://www.google.com/webhp#hl=en&su...cf11f17933379c

..

Last edited by knudfl; 03-26-2011 at 05:03 AM.
 
Old 03-26-2011, 07:24 AM   #12
adel.elkabbany
LQ Newbie
 
Registered: Mar 2011
Location: egypt, cairo, nasr city
Posts: 10

Rep: Reputation: 0
dear sir:the original message i send to u:

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. can u help me?
how i can convert awk file into xgr file?

according to your reply i put the command[/U]:

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)

what i do? thanks in advance

adel
 
Old 04-08-2011, 09:19 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,625

Rep: Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529
Did you read this ? ( instantThroughputStll.awk )

http://www.linuxquestions.org/questi...ations-873644/
 
Old 05-04-2011, 11:46 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,625

Rep: Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529
Some more links ...
1) 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

2) http://www.linuxquestions.org/questi....php?p=4334166
 
Old 04-26-2012, 03:07 AM   #15
creez
LQ Newbie
 
Registered: Apr 2012
Posts: 3

Rep: Reputation: Disabled
AWK

Dear All,

I have change the simulation time to 1200.00 on my tcl script, but I still get this result.

Warning: no packets were received, simulation may be too short

What is going on ? Please help me. Thanks
 
  


Reply

Tags
awk-ns2, dsdv_dsr, ns2, ns2-trace


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
detect file deletion on an operating system and trace the file history or activity? lovsis Linux - Security 2 10-19-2010 08:52 AM
how to import data file into Matlab and plot it? lengyue Linux - Software 2 11-29-2008 01:00 PM
How to trace and disable the HTTP TRACE method in Apache 1.3.33 with FreeBSD? SomnathG Linux - Security 1 11-11-2008 09:41 AM
.plot file printing Pier Linux - General 0 12-18-2005 03:37 PM
file usage in a graph form? garretwp Linux - Software 1 07-30-2004 01:36 PM


All times are GMT -5. The time now is 01:27 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration