LinuxQuestions.org
Register a domain and help support LQ
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 11-11-2014, 12:22 PM   #1
nassou19891
Member
 
Registered: Sep 2014
Posts: 56

Rep: Reputation: Disabled
use xgraph with awk


Hi sir

I try to get a graph by using xgraph at ns2 , i want to show the loss paquet rate in graph .

i use a file awk to get it but when i try to execute "awk -f lpr.awk out.tr " an error message showen " syntax error " .

I want to know how can i get a graph using xgraph and awk code ?
 
Old 11-11-2014, 03:20 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,877

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
Here is one example:
http://mohittahiliani.blogspot.com/2...n-ns-2_06.html
 
Old 11-11-2014, 03:25 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
Scripts to analyze packet loss : awk_scripts_11.2014.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
.. Look for files by name Packet* and packet*.

Simulations that are generating some Xgraph output files :
xgraph_ns2-files-tcl_11.2014.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
.. $ grep -Rin loss *.tcl
(There is "packet loss data" xgraph output in the joseph4* files.)


-

Last edited by knudfl; 11-11-2014 at 03:29 PM.
 
Old 11-12-2014, 03:01 AM   #4
nassou19891
Member
 
Registered: Sep 2014
Posts: 56

Original Poster
Rep: Reputation: Disabled
Think you for your responses

I follow this link http://mohittahiliani.blogspot.com/2...n-ns-2_06.html as Mr bigrigdriver tell me and i

Downloads file as Mr Knudfl said and i execute this commandeto get file.xgr " awk -f droppachets.awk

out.tr > out.xgr "


But i have a file out.xgr umpty

Can you tell me where is the problem please ?

Last edited by nassou19891; 11-12-2014 at 03:13 AM.
 
Old 11-12-2014, 05:41 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
← #4 .

The available {perl scripts, awk scripts, shell scripts} are for analyzing (mostly).
Examples { packetloss.pl, packet-loss-ratio.awk, packetloss.sh }.

How to get a plot output ? For xgraph, etc.
→ You will have to study the examples that produce such an output.
1) The examples in "xgraph_ns2-files-tcl_11.2014.tar.gz".
2) Please try $ cd ns-2.xx/tcl/ex/red-pd/ && csh runall.sh
3) `awk scripts' for converting a random file.tr to an xgraph
plot file do usually not exist.
But theoretically you can write such a script yourself.
Be aware that xgraph does not require suffix .xgr .
Any naming will do, also suffix .tr .
The important thing is the formatting. See »xgraph_ns2-files-tcl*«,
and run the examples.
And also xgraph-12.*/examples/*

-
 
Old 11-13-2014, 11:21 AM   #6
nassou19891
Member
 
Registered: Sep 2014
Posts: 56

Original Poster
Rep: Reputation: Disabled
Hi sir

I try to use the example wireless-udp-1 to make changes for my tcl file

Xgraph is well executed but for the graph of loss packets show the ligne in zero it's mean there is no loss packets .

It's is normal that there is no loss paquet or what's the problem exactly .

This is the xgraph Click image for larger version

Name:	Screenshot from 2014-11-13 17_18_13.png
Views:	33
Size:	16.0 KB
ID:	16855 for loss packets.

Also i want to get the loss packet for 3 protocols at the same xgraph what should i do ?
 
Old 11-13-2014, 12:38 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
← #6 .

Well, you can do $ awk -f packet-loss.awk file.tr
... to count "packet-loss".


Quote:
I want to get the loss packet for 3 protocols at the same xgraph
what should i do ?
Don't know.
With the right setup you may be able to show the three losses in
three different Xgraph plots ?

Example with three "Loss files" : 2x-DMOCA-code_v1.tcl →
Code:
1995: exec xgraph sink2.tr  securedsr2.tr dsr2.tr -geometry 800x400 -t "For Packet Loss" -x "Time" -y "No.of Packets" -bg white &
Ref. http://www.linuxquestions.org/questi...801/page2.html
* MOCA__TCL-files.tar.gz →
https://drive.google.com/file/d/0B7S...ew?usp=sharing
* 2x-DMOCA-code_v1.tcl →
https://drive.google.com/file/d/0B7S...ew?usp=sharing

-
 
Old 02-17-2015, 04:26 AM   #8
lilly sofhi
LQ Newbie
 
Registered: Feb 2015
Posts: 7
Blog Entries: 2

Rep: Reputation: Disabled
Question sip installation in ns2.34

i am doing ns2 project in multimedia subsystem.I want sip patch to install in my pc.How to do that? What other the other protocols that I have to do?Do anyone have programs related to multimedia environment or programs using sip?Plz help me it is urgent.
 
  


Reply

Tags
awk-ns2, moca, ns2, 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
how to start with Xgraph? shwetaam Linux - Newbie 8 11-25-2015 12:37 AM
problem with xgraph Makael Linux - Software 9 10-28-2013 08:28 PM
installation in xgraph mrohini Linux - Networking 1 01-21-2013 05:23 AM
Problem with xgraph on NS-2.34 sanaa Linux - Software 1 02-12-2012 08:35 PM
Xgraph designing Abhinay1235 Linux - Networking 1 01-29-2011 01:51 PM


All times are GMT -5. The time now is 02:50 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration