Calculating Avg Jitter

101 views
Skip to first unread message

Adi Saputra

unread,
Jan 12, 2020, 5:04:05 AM1/12/20
to Network Simulator 2 (NS2)
Hello sir.
i've struggling to calculate avg jitter from this trace file, wheter new trace or old trace format. I was trying with APP Tool but when i'am trying to calculate the avg jitter, the GUI app is freezing.

I'm building the tcl code with SUMO for the mobility and random node for sender and receiver.
link of trace file and tcl file https://drive.google.com/open?id=1ZubyD9BJd4f5m56eoMAyqf65VXn6CvUd

Any help will be very useful.
Thanks



run_manet.tcl
manet_mobility.tcl

knudfl

unread,
Jan 12, 2020, 8:16:36 AM1/12/20
to Network Simulator 2 (NS2)
Hi.

To run "Saputra run_manet.tcl" the node number, val(nn) is edited to 51.
The trace file `newtrace_manet.tr´ is  8.9MB.

Available "Jitter" analyzing scripts →  z7-scripts-overview-7.txt
**** Jitter ****
Avg_Jit.awk
Avg_Jit_Flow.awk
delay_-_jitter_alterado_einar.awk
instantJitter2005.awk
instantJitter2009.awk
Instnt_Jit.awk
Instnt_Jit_Flow.awk
intervalo_confianca_delay_-_jitter.awk
intervalo_confianca_delay_-_jitter_maximo.awk
Jitter2007.awk
jitter_.awk
jitter.sh
measure-jitter.awk
media_simples_delay_-_jitter.awk
$ awk -f delay_-_jitter_alterado_einar.awk newtrace_manet.tr
0.165443 0.047144 0.338058 0.271592

$ awk -f intervalo_confianca_delay_-_jitter.awk newtrace_manet.tr
0 128.84 0 0 128.37 129.309

$ awk -f intervalo_confianca_delay_-_jitter_maximo.awk newtrace_manet.tr
0 128.84 0 0 128.37 129.309 33.0138 0 32.8014 33.2263 0 0

$ awk -f Jitter2007.awk newtrace_manet.tr
Jitter1 = 14.55
Jitter2 = 15.14

To know the sequence of the results, please read the four awk scripts used for the analysis.

About APP-Tool : 
The usually two  best "Avg_Jitter" scripts are Avg_Jit.awk, Avg_Jit_Flow.awk from APP-Tool.
Unfortunately they cannot be used with your trace file.
I.e. this is a common issue : Not all trace files will match a "standard script".
Hence the ~240 scripts in Awk+Perl_ns2-scripts-07.19.tar.gz .

Adi Saputra

unread,
Jan 13, 2020, 9:28:16 AM1/13/20
to Network Simulator 2 (NS2)
Thank you for your reply Sir.

Why i need to change my node number sir? in my SUMO configuration, im using 50 node to generate mobility and node for tcl file.

Why my trace file cant use those two best jitter calculation sir? even with the old trace that im generate, sir?

Thank you very much

knudfl

unread,
Jan 13, 2020, 11:42:29 AM1/13/20
to Network Simulator 2 (NS2)
Hi.
»» Why I need to change my node number «« :
I don't know.  It just happened so that running the simulation yesterday, a reply said :
No node_(50).   ....  Today it's OK with set val(nn)  50

»» Why my trace file cant use those two best jitter calculation «« :
It's a well known thing that an awk or perl analyzing script must fit with the trace file.
If two awk files were sufficient, we wouldn't have all those other (240) scripts.
* metrics.awk and the dash script Metrics_Performance_Extractor.sh could do all analyzing.
If all trace files had the same syntax. But it isn't so.

You can try running all manet / vanet examples, and do the analysis, to see how it works.
.... There are various sumo scripts connected to the vanet examples.


Adi Saputra

unread,
Jan 14, 2020, 12:43:42 AM1/14/20
to Network Simulator 2 (NS2)
Thankyou very much sir for your reply.

i will try your suggestion.

Adi Saputra

unread,
Jan 14, 2020, 11:13:58 PM1/14/20
to Network Simulator 2 (NS2)
Im sorry sir.

im already implemented new protocol (identical protocol of aodv -> pa_aodv). ./install command was successfully.
when im trying to use the new protocol, ended with this error.

num_nodes is set 50
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl

    (_o14 cmd line 1)
    invoked from within
"_o14 cmd addr"
    invoked from within
"catch "$self cmd $args" ret"
    invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
    (procedure "_o14" line 2)
    (SplitObject unknown line 2)
    invoked from within
"_o14 addr"
    ("eval" body line 1)
    invoked from within
"eval $node addr $args"
    ("default" arm line 2)
    invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 "$node start-dsr"
}
AODV {
set ragent [$self cre..."
    (procedure "_o3" line 14)
    (Simulator create-wireless-node line 14)
    invoked from within
"_o3 create-wireless-node"
    ("eval" body line 1)
    invoked from within
"eval $self create-wireless-node $args"
    (procedure "_o3" line 23)
    (Simulator node line 23)
    invoked from within
"$ns_ node"
    ("for" body line 2)
    invoked from within
"for {set i 0} {$i < $val(nn) } { incr i } {
        set node_($i) [$ns_ node]
        #$node_($i) set X_ [ expr 10+round(rand()*480) ]
        #$node_..."
    (file "run_manet.tcl" line 55)

what sould i do sir?
thank you

On Tuesday, January 14, 2020 at 12:42:29 AM UTC+8, knudfl wrote:

knudfl

unread,
Jan 15, 2020, 9:05:25 AM1/15/20
to Network Simulator 2 (NS2)
»»run_manet.tcl" line 55 «« :

... Please have a look at line 55, and the lines below line 55.
Can be any error in the "line 55 section".

If no luck then please attach the edited file `run_manet,tcl´ as run_manet-2.tcl .
I.e. an edited file must have a new file name.

Other considerations :
The new protocol is faulty and / or conflicts with the default protocols aodv, dsdv, dsr.
Or can simply not run with your example simulation :
Do simulation tests with all manet ex, and some of the ~70 AODV ex.
.... The protocol should also be able to run a simple ex with no protocol specified ?

knudfl

unread,
Jan 15, 2020, 3:51:26 PM1/15/20
to Network Simulator 2 (NS2)
Other info / ns2 best practice :
Never add a new non tested protocol to an ns2 containing one or more "add on protocols".
... You already have OLSR / MPOLSR (+kmpolsr?) added to the suggested "pa_aodv" files.

Best practice is to test with a stock ns2. 
Later on you can try adding other protocols to know if they can live together.
Actually many of the known add on´s will conflict.
See the ~300 ns2 patches .... about 15 of those are combined add on´s

* You can have as many ns-allinone-2.xx as you want, installed at the same time.

ns-2.35, 2014 .. 2017 update → ns-allinone-2.35_gcc5.tar.gz
https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing
ns2-INFO.txt

Adi Saputra

unread,
Jan 15, 2020, 6:08:01 PM1/15/20
to Network Simulator 2 (NS2)
Thank you very much for your reply sir
I need AODV based protocol that i can edit the routing table and queue with different algorithm, so i cant do that, because in case they cant live together, right sir?

knudfl

unread,
Jan 15, 2020, 6:52:41 PM1/15/20
to Network Simulator 2 (NS2)
»» ... they cant live together ? «« :  I don't know.

Just try with a clean ns-allinone-2.35_gcc5.tar.gz unpacked to a new folder.

Adi Saputra

unread,
Jan 16, 2020, 2:16:27 AM1/16/20
to Network Simulator 2 (NS2)
Im very sorry sir, so many question that im asked to you.

Sir, you say i can have multiple installation of ns2.35. So how i can have 2 installation with one AODV protocol and the another one is my modified AODV on a different installation of ns2.35.

if i can do that, how i run command 'ns' on terminal sir? which installation of ns2.35 will called by 'ns' command?

thankyou sir.

Adi Saputra

unread,
Jan 16, 2020, 5:07:58 AM1/16/20
to Network Simulator 2 (NS2)
Thankyou sir, the error already fixed.

im make wrong spell on ns-lib.tcl, and the worst after change it, configure and recompile, im forgot to copy the latest executable ns from installation folder to /usr/local/lib.

thankyou very much sir.

knudfl

unread,
Jan 16, 2020, 7:20:00 AM1/16/20
to Network Simulator 2 (NS2)
Read my answer :  
`ns2-INFO.txt´  says "copy ns as ns-any-name to /usr/local/bin/."

Please read `ns2-INFO.txt´ carefully / multiple times.

See my list with 350ns* commands → usr.local.bin-16Jan2020.txt
.... Which actually means that I have far beyond 300 times ns-allinone-2.xx functional at the same time.

This is the default way of installing ns2 :
$ cd ns-2.35/
$ sudo make install       ## 'make install' will copy 'ns' to /usr/local/bin/
          ## 'make install' only when you have  one ns2 installed.
          ## !  Nothing / no PATH text should be added to e.g. `.bashrc´! 
          ## /usr/local/bin/ is already a system PATH.

     // Adding a new name / a backup for the executable ns :
$ cp ns ns235-new-name
$ sudo cp ns235-new-name /usr/local/bin/
     // Simulation //
$ $ ns235-new-name new.tcl
usr.local.bin-16Jan2020.txt

knudfl

unread,
Jan 16, 2020, 7:22:07 AM1/16/20
to Network Simulator 2 (NS2)
»» I forgot to copy the latest executable ns from installation folder to /usr/local/lib. «« :
!  Not /usr/local/lib/,  but  /usr/local/bin/

Adi Saputra

unread,
Jan 18, 2020, 1:24:32 AM1/18/20
to Network Simulator 2 (NS2)
thankyou sir.
im sorry for making such a silly mistakes.
Reply all
Reply to author
Forward
0 new messages