LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-14-2014, 10:51 AM   #1
nassou19891
Member
 
Registered: Sep 2014
Posts: 56

Rep: Reputation: Disabled
help to execute shell file with trace file


Please i read in this link http://nile.wpi.edu/NS/ that i can use shell file "jitter.sh " with "column" Perl file and "out.tr" file to extract results in file "jitter.txt" .

But i don't found a command to execute this files together to have the "jitter.txt" file

Please have an idea how i can get the results in "jitter.txt" file ?? i mean what is the command under ubunto i can use it ??
 
Old 11-14-2014, 12:34 PM   #2
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: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Quote:
I read in this link http://nile.wpi.edu/NS/ that I can use .. "jitter.sh"
There are about 30 sections in http://nile.wpi.edu/NS/,
which section is about `jitter.sh´ ? ?
* Please specify "Section headline" by name.

About http://nile.wpi.edu/NS/ : Updated eleven years ago !

-
 
Old 11-14-2014, 01:15 PM   #3
nassou19891
Member
 
Registered: Sep 2014
Posts: 56

Original Poster
Rep: Reputation: Disabled
Sorry i mean the section "Example Utilities" in Example Utilities .
 
Old 11-14-2014, 01:47 PM   #4
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: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
← #3 .

OK, http://nile.wpi.edu/NS/ → Example Utilities → Trace Analysis Utilities.

Using : $ sudo apt-get install tcsh
$ chmod +x jitter.sh
$ ./jitter.sh out.tr

* May work ? with some files `out.tr´.
* Be aware that only files by name "out.tr" can be used :
$ ln -s <any-other-name>.tr out.tr
( Or : you can make a dedicated "jitter.sh" >>> new.jitter.sh,
i.e. edit line 3 to your-file.tr : cat your-file.tr | grep ... ).


The file jitter.sh is also present in awk_scripts_11.2014.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
Code:
#! /bin/tcsh -f

# Here is a tunneled shell command called jitter.sh combined with awk, 
# which calculates CBR traffic jitter at receiver node (n3) using data in "out.tr", 
# and stores the resulting data in "jitter.txt".
# This shell command selects the "CBR packet receive" event at n3, selects time (column 1) and
# sequence number (column 10), and calculates the difference from last packet receive time divided
# by difference in sequence number (for loss packets) for each sequence number


cat out.tr | grep " 2 3 cbr " | grep ^r | column 1 10 | awk '{dif = $2 - old2; if(dif==0) dif = 1; if(dif > 0) {printf("%d\t%f\n", $2, ($1 - old1) / dif); old1 = $1; old2 = $2}}' > jitter.txt
 
Old 11-14-2014, 02:15 PM   #5
nassou19891
Member
 
Registered: Sep 2014
Posts: 56

Original Poster
Rep: Reputation: Disabled
Think you very much for your response

I try to execute this commande as you said for me but an error message was showen

column: 1: No such file or directory
column: 10: No such file or directory


Have you a response why this error was showen please ?
 
Old 11-14-2014, 06:51 PM   #6
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: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
← #5 .

Could be the script `jitter.sh´ just don't work at all with any file.tr ?
Or that it might work with a particular formatting of a trace file ?

"jitter" : Google .. ns2 measure jitter ..
https://www.google.com/webhp?hl=all&...measure+jitter
→ Example ...
http://trungtm.wordpress.com/2007/07...-applications/
→ "How to measure packet loss rate, jitter, and end-to-end delay
for UDP-based applications".
-
Attached Files
File Type: txt smallko-UDP.tcl.txt (2.3 KB, 6 views)
File Type: txt measure-jitter.awk.txt (1.3 KB, 7 views)
 
Old 11-15-2014, 05:26 AM   #7
nassou19891
Member
 
Registered: Sep 2014
Posts: 56

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

all the codes that i found like you send it to me and all over my research is about UDP protocol and CBR flow traffic

But i will work with TCP,SCTP,DCCP protocols That's why i'm blocked

I try to execute the code in this link http://trungtm.wordpress.com/2007/07...-applications/ but no result

Have you any idea about codes for TCP , SCTP,DCCP protocol with FTP flow ??
 
Old 11-15-2014, 08:39 AM   #8
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: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
← #7 .
Quote:
I try to execute the code in this link
http://trungtm.wordpress.com/2007/07...-applications/
but no result
Result : Please use the edited files attached to post #6 and #8.
* They are there for a reason.
* Too many funny characters in the files from the link.
-
Attached Files
File Type: txt measure-delay.awk.txt (763 Bytes, 4 views)
File Type: txt measure-loss.awk.txt (514 Bytes, 4 views)

Last edited by knudfl; 11-15-2014 at 08:43 AM.
 
Old 11-15-2014, 11:29 AM   #9
nassou19891
Member
 
Registered: Sep 2014
Posts: 56

Original Poster
Rep: Reputation: Disabled
Ok i downloads this files and i executed think you

but there is a problem , always show me there is no paquet loss = 0 so i have look to my file.tr i didn't found any dropped paquets ( no letter "d" in any ligne in this file.tr )

Is that mean that the problem is in the topologie from the begining or what ??

Note : I execute the NAM file and i see that there is a transfer of flow paquet

Also forcalculate the delay or the jitter , i have an error message " division by zero attempted" i think that in the jitter.awk it does not count the send delay and the receive delay so it takes zero and when it do the division opperation this message was showen

Please can you help me to correct this errors ??
 
  


Reply

Tags
ns2


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
windows file cannot execute on shell zak100 Linux - Newbie 2 10-28-2014 03:05 PM
Execute a shell script when clicking on a certain file extension antlarac Linux - Newbie 2 01-30-2013 10:55 AM
unable to execute a 4GE file in ksh shell gnagendr Programming 7 04-08-2010 02:56 AM
cannot execute script file from shell shahrahulb Linux - General 4 03-04-2008 08:02 AM
execute shell command inside of tcl file khucinx Programming 1 07-05-2004 02:29 PM


All times are GMT -5. The time now is 12:33 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration