LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   help to execute shell file with trace file (https://www.linuxquestions.org/questions/linux-newbie-8/help-to-execute-shell-file-with-trace-file-4175525392/)

nassou19891 11-14-2014 09:51 AM

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 ??

knudfl 11-14-2014 11:34 AM

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 !

-

nassou19891 11-14-2014 12:15 PM

Sorry i mean the section "Example Utilities" in Example Utilities .

knudfl 11-14-2014 12:47 PM

← #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


nassou19891 11-14-2014 01:15 PM

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 ?

knudfl 11-14-2014 05:51 PM

2 Attachment(s)
← #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".
-

nassou19891 11-15-2014 04:26 AM

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 ??

knudfl 11-15-2014 07:39 AM

2 Attachment(s)
← #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.
-

nassou19891 11-15-2014 10:29 AM

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 ??


All times are GMT -5. The time now is 10:22 AM.