LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 11:22 AM   #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, 02:20 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Here is one example:
http://mohittahiliani.blogspot.com/2...n-ns-2_06.html
 
Old 11-11-2014, 02:25 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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 02:29 PM.
 
Old 11-12-2014, 02: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 02:13 AM.
 
Old 11-12-2014, 04:41 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #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, 10: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:	89
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, 11:38 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #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, 03: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



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-24-2015 11:37 PM
problem with xgraph Makael Linux - Software 9 10-28-2013 07:28 PM
installation in xgraph mrohini Linux - Networking 1 01-21-2013 04:23 AM
Problem with xgraph on NS-2.34 sanaa Linux - Software 1 02-12-2012 07:35 PM
Xgraph designing Abhinay1235 Linux - Networking 1 01-29-2011 12:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:38 PM.

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
Open Source Consulting | Domain Registration