I’m posting the last version of NS2 Visual Trace Analyzer I’ve developed, 0.2.72.
It has many features: plots delay, jitter and throughput graphics, calculates many statistics per node or per flow and it has a visual interface of the nodes disposition along the simulation.
The visual tool doesn’t show the packets exchange, I’ve not finished this feature, but it shows pretty well the nodes disposition, coverage and movement.
Application
You can download here: NS2 Visual Trace Analyzer 0.2.72
MD5: 4B07436896E5B6A21BB6F28963B5090F
SHA-1: EC27C104CAC244043F90384E3E0282019008681A
User Manual
You can download here: NS2 Visual Trace Analyzer Manual
MD5: 2497745A1B9EB84CC151E41E2873A248
SHA-1: A3AFF9F488539FD8690E73124050182171A765D3
Application Crashes Troubleshooting Manual
Disable nodes movements interpretation: Disable Nodes Movements Manual
MD5: F715E995133398840BF1E1F5F219A6D3
SHA-1: BC8E206D28720D1FFDFCFC1870AC3F4BF5154DAF
Hope you like it!
Hi,
Have you tested analyser with tom henderson’s satellite scripts?
Kindest regards, Valeriy.
Hi Valeriy,
No, unfortunately I didn’t.
I guess It could work, although the visual node positioning and movement will probably fail (the satellite positioning uses latitude and longitude)… I’m pretty sure the statistics would be correct, because the rest of the trace file format is similar to wired/wireless.
If someone could confirm this, It would be great.
Kindest regards,
Fernando
Is it Windows based Software? Because in Ubuntu Linux 12.04 It is giving error during installation. .rar file is not opening properly.
Hi Das,
Yes, it’s for Windows, but I think it will work on Linux if you use an emulation program like WineHQ without any problem.
If you’re having trouble decompressing the RAR, I can use ZIP to avoid compatibility issues, I’ll do that right now. The error might also be because you’re not downloading the entire file, but that’s more unlikely, I’ll make a checksum result available for all to check if the file was downloaded properly.
Best regards and good job!
very good fernando, you really did a good work in tracing and scenario, still trying and testing your visual trace analyzer…
http://www.pradeepkumar.org
Thank you very much Pradeep!
I’ve also enjoyed your site, is very useful and informative, good job.
Regards.
How to calculate convergence time and number of updates of ns2 trace file with your visual trace analyser ?
Hi lovsis,
The convergence time can be very difficult to compute because the routing information can be exchanged during the whole simulation.
If the flow id of the initial routing information differs from flow id used for exchanging information in the rest of the simulation, this calculation is easy, you can open the flow properties window and then the “Connection” tab shows the value “Life Time”, in this case the convergence times is the same as the “Life Time” of the flow. You can check this image.
Another option is to schedule to send data only 5 seconds (or something like that) after the initial routing information exchange. This way you can literally divide the trace file in two parts:
When you’re telling “number of updates” you’re might be referring to the number of times that a route has changed or the number of route update packets. You can see both of these metrics with this utility.
The first one you can check with the “Path Shifts” window of the main flow, this will show the number of times that the flow route has changed.
The second one you can check opening the properties window of the flow responsible for sending route updates. This window will show the total packets generated, sent, dropped and received. It also shows in terms of bytes, so you can calculate the impact of the routing protocol.
I hope this helps your research.
Could you explain a bit more about plotting graphs because I’m not getting any , though I did change the trace level and synch.interval
Regards
Hi binteasim,
Please try plotting, for instance, “Delay -> Per Packet” with default settings, you should be able to see something.
If you can’t see anything plotted, you can send me the TCL and Trace files and I will try to see what’s wrong.
Best regards.
Where may I send you the tcl or trace files?
Hi binteasim,
Send them to “darkcompiled@gmail.com”.
You may send a compressed archive like ZIP or RAR.
Best regards,
Fernando Rocha
This looks an awesome piece of software!
I am working on a project for using MANETs, and I get errors relating to finding nodes within the trace file.
What am I doing wrong?
Hi Duncan,
As far as I can tell, the MANET extension does not modify the trace file. You should, however, tell ns2 to use the new trace file format in the TCL (“use-newtrace”).
If you’re having problems loading the trace file because nodes weren’t found, that means the application isn’t recognizing the nodes declaration in the TCL file. Unfortunately the application has a little limitation recognizing nodes declaration in the TCL file, there are so many ways to declare nodes…
When a node isn’t properly loaded or recognized by the application, you can explicitly add the node manually in the TCL file, at the point that the node is being added but not recognized, this way the nodes will be ordered. For instance:
set N5 [$ns node];
set N6 [$ns node];
This will allow the application to recognize and load the remaining nodes previously not recognized (N5 and N6).
Once the application recognizes all the nodes, the application will now be able to work.
NOTE: This is a workaround, this modified TCL file should only be used with NS2 Visual Trace Analyzer, you MUST run your simulation with the original TCL file.
If you’re still having problems you can send me an e-mail with your TCL and trace files.
Best regards,
Fernando Rocha
I have the cbrgen-xxx.tcl file and the xxx.tr file (which is huge (486Mb), so Im only going to send you some of it.
Where do I send it please?
Duncan
Hi Duncan,
You can send it to my gmail account: darkcompiled@gmail.com
You can send a maximum compressed archive like ZIP or even RAR.
Best regards,
Fernando Rocha
hiiiiiii sir is it window based could i run it on fedora ,if yes then how bcoz it is exe file.
Hi Naveen,
Last time I checked it was fully compatible with WineHQ under Fedora.
WineHQ can run some Windows applications under Linux.
Best regards,
Fernando
Hi,
I’m trying to plot the throughput/delay etc for a wired cum wireless scenario but it doesn’t seem to work…
Do you have no idea of what I should do?
Thanks!
Hi Storm,
Try plotting “Per Packet” graphics, those are easier to configure and must work with default settings.

The following image shows how to do that:
If that doesn’t work, you probably have the MAC and AGT trace levels disabled in your TCL, you must enable them and rerun the simulation.
For plotting other type of graphics, you can adjust the “Trace Level” to MAC or AGT.
To plot “Over Time” graphics and “Throughput” you must also assure the traffic is running through the target node.
I hope this was helpful.
Best regards.
Hi, thanks the swift reply! It took some modifying of my code but it worked!
Is there a way to generate a graph of Throughput/Delay against Load?
Thanks a bunch again.
Hi Storm,
That would be interesting, but currently that’s not possible.
You can however, export the throughput/delay graphic to CSV, load it, for instance, with Microsoft Excel, and then you just need a way to get the Load data.
If the traffic generated is constant, I guess the Load would be easier to plot.
The application can only show you the minimum/average/maximum Load, not a graph.
Best regards.
Nevermind! It shouldn’t be too difficult to do it manually. Thanks a lot for the help and the great software.
Pingback: NS2
Sir i want to calculate the propagation delay between nodes from the trace file of Tcl type and i am using fedora 11. plz tell me how can i use this software. can i use it in windows after preparing trace file in fedora 11? i also want to know that what language(e.g. awk, shell, perl or something else) should i use to analyze a trace file……. plz suggest me the easier one bcoz i m doing this for the first time…….. thank u.
Hi Pinto Das,
Unfortunately the application can’t tell you the propagation delay between nodes, only the complete delay (since the source node begins to send the packet until it is completely received from the destination node). This is what the RFC 2679 describes.
For the complete delay, you can check the minimum, maximum and average values, or even plot a graphic over time.
Adding an option for the propagation delay seems a nice feature for the next release.
Best regards,
Fernando Rocha
Hi,
I’m not too sure if I’ve done something wrong to the trace files or my simulation is completely wrong. But I am getting throughput of around 440kb/s when I should be expecting 2Mb/s… Probably a long shot, but do you have any idea what I may have done wrong?
Hi,
It might be just a matter of units. You might be specifying the bitrate using Mbps (bits) and the tool is configured to show throughput in bytes as default (you can configure it to show in bits instead).
Be also aware that the TCP protocol has some congestion protection mechanisms that may affect the throughput.
I hope this helps,
Fernando Rocha
hi
can u provide us installation steps in ubuntu 11.10
Hi Abhishek,
I will install a virtual machine with Ubuntu and will try to document the steps to work with the tool.
Best regards,
Fernando Rocha
Hi Abhishek,
I’ve just installed Ubuntu and ran without problems NS2 Visual Trace Analyzer.
You just need to install WineHQ. Installation instructions are available here:
http://www.winehq.org/download/ubuntu
After you have installed WineHQ 1.4 (or 1.5 if the 1.4 version fails to install), you can download the tool, unzip the ZIP archive and run the EXE archive like you would do in Windows.
Please tell me if you still have problems, I might be able to assist you remotely.
Best regards,
Fernando Rocha
Sir
I am having problem while loading the trace file in trace analyzer on windows, it is giving error.I modified the tcl file by adding the nodes explicitly also then also problem is not resolved.
Hi Soumya,
Could you please send me the TCL and the trace file (or part of it) to my e-mail? You can send them in a compressed ZIP or RAR.
My e-mail is: darkcompiled@gmail.com
Best regards,
Fernando Rocha
sir,
I want run this visual trace analyzer in RED hat linux.
Please help me to install it
Hi Priya,
What version of Red Hat do you have?
Best regards,
Fernando Rocha
HI sir,
I am having problem while loading the trace file in trace analyzer on windows, it is giving error and stopped working.I loaded different trace files but its not working.
Hi Mozhi,
Please try the workaround described in “Disable Nodes Movements Manual” above.
Please tell me if that works.
Best regards,
Fernando Rocha
Pingback: NS2 - Page 2
Sir
While evaluating performance of AODV routing protocol, ns2 trace analyzer is not displaying the AODV control packets sent,lost. I need the routing traffic also to compare it with DSR. Please help me.
Thanks
Hi Soumya,
Damn, you’re right… the protocol isn’t completely supported by the tool, that’s the reason why the flow doesn’t appear.
I really hope to release a new version of the tool with this completely implemented, but there is so much work to do before that…
Best regards,
Fernando Rocha
And Sir is this grep command correct to find number of aodv control packets sent which is required to calculate routing overhead
routing overhead = no. of control packets sent / no. of packets delivered
cat out.tr l grep RTRl grep AODV l grep ^s l wc -l
I have one more confusion, packets lost must be equal to packets sent – packets recieved but it is not followed in the output which ns2 trace analyzer is giving ???
Hi Soumya,
packets lost = packets sent – packets received – packets dropped.
You shouldn’t have any packets lost if you run your simulation till the end. Packets lost are packets that were sent but weren’t neither received nor dropped.
This means that packets are still in queue or on transit. This shouldn’t happen if your simulation runs till the end.
Best regards,
Fernando Rocha
I am running the simulation for wireless communication scenario till the end and then also packet lost is not equal to packet sent – packet recieved – packet dropped. Plz tell me no. of packet lost that it is showing is right or not ? I can send the tcl and trace files if required.
Hi Soumya,
I’m sorry for the late reply, I’m extremely busy at work…
Please, send me the TCL and TRACE files then, I’ll try to check that.
Kindest regards,
Fernando Rocha
Hi sir, I have seen you said plotting the graph throughput/delay with microsoft excel, can you guide me on how to do this with excel? Or possibly any links that i can follow. I have try to search in google, but no luck
Hi Nickee Leong,
I’ll try to build a little tutorial on how to do that.
Best regards,
Fernando Rocha
Good Day!
Actually I’m new for NS-2. I tried wireless scenario which was suggested by Marc Greis Tutorial. Surely the issue of analysis of trace files is most important for me. I tried NS-2 Wireless Trace Analyzer but it doesn’t work. It gives me a message about it.
I use Windows 7. But I’ve got trace files in Ubuntu 11.10 (It is on virtual machine).
What can be the problem?
I also tried to load wire scenarios and everything was ok.
Thank you.
Hi Kate,
Please use the new trace file format.
To do that, add the following line to your TCL:
$ns_ use-newtraceset tracefd [open simple.tr w]
$ns_ trace-all $tracefd
Also, if the application crashes, please chose right after opening the NS2 Visual Trace Analyzer, the “Cenario File” in the “Simulation” tab, before you load anything. After that, load the TCL and then the TRACE – that should work now.
If you still having problems, please contact me again.
Best regards,
Fernando Rocha
Good Day! I used the new trace format. But the problem was in selection of Trace and Cenario File. Now I select Cenario file but load the *.tr one. It seems that it works. Thank you.
However I have a question. I read you tutorial, and couldn’t understand what you mean…
At the page 13 you wrote “At the level dependant properties you can see the node statistics by level, usually “AGT” (Agent), “RTR” (Routing) and “MAC” (Media Access Control)…. The “Received” property displays the total data received from the node.” What does it mean? Does It mean FROM the node or BY the node? Because in case “FROM the node” it means how many other nodes recieved the packets from this node. Does it correct? The same queation to “Transferred”.
Thank you.
Hi Kate,
You’re right, the sentence is incorrect.
The properties “Received” and “Transferred” should state “… received by the node …”.
Thanks for correcting that.
Kindest regards,
Fernando Rocha
Thank you for your quick replies! I have a lot of questions
It is not clear for me how I can load scenario and traffic files in your product. Is there any oppotunities of it? If “yes” what should I write to options in my tcl file? Now I write the way to this files:
set val(cp) “../mobility/scene/cbr-3-test”
set val(sc) “../mobility/scene/scen-3-test”
Hi Kate,
I’m not sure if I understand you question, please check if this answers what you’ve asked.
The tool loads the scenario from the TCL file interpreting commands like:
«...$node(0) color green
$node(1) color purple
...
$node(0) set X_ 15.0
$node(0) set Y_ 30.0
$node(0) set Z_ 0.0
...
$topo load_flatgrid $opt(x) $opt(y)
...»
Unfortunately it’s not possible to build or modify a scenery file, only to load it.
Sometimes the application might miss interpreting some TCL code, most of the times because it’s too complex and the application parser is very basic, is not expecting much complexity reading the TCL.
Kindest regards,
Fernando Rocha
I am sorry but i don’t understand…There are several types of AGT packet in Properties of the node. It shows me that there are 2048 p. sent, 2048 recieved and 2048 transfered (properties of node 1 – sink). In Properties o node 0 (tcp) there are 2053 sent, 2031 recieved, 2031 transfered. Nothing dropped in AGT.There are 2057 sent, 2056 recieved, 3 transfered and 6 dropped for RTR of node 0. For RTR of nade 1 – 2051 sent, 2052 recieved, 0 transered and 17 is dropped. How can be the following situations: node 0 send 2053 packets, 6 of them dropped. So the node 1 should recieve 2047 but it gets 2048! Please help me
Hi Kate,
Please send me the TCL and Trace files, you can send as a compressed ZIP or RAR archive.
I’ll try to check what’s going on.
Kindest regards,
Fernando Rocha
Hello Sir. Thanks for this awesome software & active forum.
I am working on project which requires to compare performance of AODV & DSDV protocol.
I have successfully got trace files (.tr files) for AODV & DSDV.
I want to find throughput & delay to compare both routing protocols..
How can I analyze a trace file for the same?
I worked on Ubuntu 11.04 on VM Ware.
I am very new to NS-2.
So please help me ASAP.
I need to submit my project on this Monday itself.
Hoping for your favorable response sir…
Once again thanks & response ASAP…
Thanks..
Hi Keyur,
I’m sorry, I was unable to arrange time to build you a tutorial yet.
I’ll build it anyway and make it available to everyone so this won’t happen again.
Best regards,
Fernando Rocha
Hi
I’ve successfully integrated a modified version of aomdv into ns2.34 in ubuntu 12.10 but when i try to trace it through a tcl file i get the following error:
(_o15 cmd line 1)
invoked from within
“_o15 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 “_o15″ line 2)
(SplitObject unknown line 2)
invoked from within
“_o15 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 "_o4" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o4 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o4" 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) random-motion 0 ;# disable random motion
# On détermine la positi…"
Sorry I know this forum is meant for quries related to trace analyzer but i've tried every solution on the internet but nothing sought. you are my last hope, my project deadline is this month end, have to plot a graph. your interest in debugging made me post this. please help me.
Thanks
Sudheer
Hi Sudheer,
I found a very similar (or even the same) error at this forum:
LinuxQuestions
I hope the solution provided there works for you.
Best regards,
Fernando Rocha
Hello Dear Fernando
I am trying to use your app for WiMAX, and when I put the tcl files and trace files and also I tried disabled the nodes movements, but it did not worked
I can send you the tcl and trace file, my email is: rez.golestani@gmail.com
Hii
Is ns2 visual trace analyzer works for GPSR protocol ??
When I gave the tcl file and trace file, it is showing node 2 not found error. I can send u the files if needed.
Hi Soumya,
I’m sorry for the late reply.
You need to create the node explicitly in the TCL file, you can use a separate TCL file to do that.
If you’re still trying to work with my application, please send the TCL and Trace files to darkcompiled@gmail.com.
You can use a compressed archive like ZIP, RAR or 7zip.
Best regards,
Fernando Rocha
hi,
i tried to load the trace file but it is not loading it always shows “NS2 Wireless trace Analyzer has stopped working” . When i load the .tcl file , it loads the node properly but i don’t know why it is not able to load trace file. Can you please help me out!!
Thanxs in advance!!!!
Hi Shashank,
That’s because of node movements, you can disable them as shown on “Application Crashes Troubleshooting Manual”.
Tell me if that works for you.
Best regards,
Fernando Rocha
hi sir..
i just wanna ask..why in the scenery part.. it shows ’0 2′ is not a valid integer value..when i want to load the tcl script.
why this happened sir?
im using the ns-2 in Ubuntu 12.04 LTS and now i wanna analyze my trace file..
ur help is highly appreciated..
Regards.
Ash
Hi Ashaari,
The application was unable to parse your TCL file correctly.
You can unloop the creation of your nodes allowing the application to load your nodes correctly. You can use that modified TCL file just for the application to load nodes and use the other TCL file for the ns2.
I hope it helps you.
Best regards,
Fernando Rocha
hey sir
Thank u 4 this program it’s quit helpful but i wanted to add a new parameter to the default ns2 trace file parameters for example I want to calaculate Transmission Power, Energy
Can u plz help me out as i am new to ns2 or provide me with links that can
Thannx alot