Ns2 Visual Trace Analyzer Manual
Ns2 Visual Trace Analyzer Manual
Ns2 Visual Trace Analyzer Manual
Index
1. Introduction ...................................................................................................................... 3 2. Release Notes .................................................................................................................... 4 3. TCL Configuration and Troubleshooting ............................................................................. 6 3.1. Setting Nodes Colour.......................................................................................................... 6 3.2. Setting Nodes Position and Movement ............................................................................. 6 3.3. Setting Trace File Format ................................................................................................... 6 3.4. Setting Nodes Configuration .............................................................................................. 7 4. Requirements .................................................................................................................... 8 5. Load Simulation ................................................................................................................. 9 5.1. Loading TCL File .................................................................................................................. 9 5.2. Loading Trace File ............................................................................................................. 10 6. Statistics .......................................................................................................................... 12 6.1. Node Statistics .................................................................................................................. 12 6.2. Flow Statistics ................................................................................................................... 14 6.3. Routing Information (Path Shifts) .................................................................................... 15 7. Graphics .......................................................................................................................... 16
1. Introduction
Even though NS-2 is a powerful and widely used simulation tool, the analysis of the data obtained from the simulations is not straightforward. The Network Animator (NAM) can be used to visualize packets, but it does not supply any statistics or graphics as needed for data analysis. Moreover, the parsing of the NS-2 trace file using AWK scripts developed by users requires a further step to do data processing and graphical organization, many times does not work properly and the results are subjective. There are alternative tools, but most of them are not standalone applications, since it only works with libraries from Matlab, or requires some additional libraries and it has a user interface that lacks user-friendliness. In this scenario, the need for a standalone application that is able to easily translate the NS-2 trace files into graphics and to give a summary of what occurred during simulations, has led to the development of a new data analysis tool, NS2 Visual Trace Analyzer. The first version of the application was developed in the Laboratory of Communications and Telematics (LCT) of the Centre for Informatics and Systems of the University of Coimbra (CISUC) during several PhD using the NS-2. This document presents the NS2 Visual Trace Analyzer, an application capable of analysing NS-2 normal wired and wireless trace files along with some other formats. This tool is capable of analysing the trace files and making graphics and statistics about the behaviour of the flows in simulation. Simple, standalone, user-friendly, very fast, intuitive, this application will certainly help to get results. The main characteristics and functionalities are described in this document, along with some examples.
2. Release Notes
Version
0.2.54
13-12-2007
Description
First public version released.
0.2.55
18-12-2007
1. Minor Internal and GUI Bug fixes. 2. A Node can now be correctly disguised as other Node: This feature allows joining two Nodes. For instance, if Node ID 10 is the same as Node ID 15, or we want to assume they are the same, we can disguise the Node 10 as Node 15. Node 10 will then be treated as if it was Node 15. 3. Changes in Scenario File Structure: Having any trouble opening old scenario files (.cen), it is strongly recommended to open TCL files instead, and save scenario files again, with the new format. 4. Experimental Paths Viewer: It is not possible to see any path statistics yet, just see the various paths each flow/stream used. All paths will be listed, including reversed paths. I would appreciate any feedback of this new feature. 5. Bug fixed: Small files with movements can now be loaded! Some bugs while loading TCL and Trace file were fixed; fortunately there is no impact on results. 6. Bug fixed: A problem with Node IDs was fixed. Node IDs were not translated into Long Ids when no address was specified in the TCL file. Fortunately there is no impact on results. 7. Minor GUI bugs corrected.
0.2.56
22-01-2008
0.2.57
18-02-2008
0.2.58
08-04-2008
0.2.59
10-04-2008
8. Path-Shifts Improvement: Paths are now compared as a single block of memory, speeding up the comparison procedure. Node IDs are now showed instead of Node Addresses. 9. OpenGL Improvement: Use of a Display List to draw the selection icon. Minor improvements removing redundant commands. Improvements using the OpenGL stack. 10. Path-Shifts Improvement: Path-Shifts shows now the right number of packets, groups correctly the packets and the routes they took, and allows to navigate deeply in the structure. 11. Path-Shifts bug fix: Packets are now ordered by Time they were sent, instead of the ID and SCTP-ID. Times are now correctly showed in the Path-Shifts window. 12. Internet Update Improvement Minor improvements regarding the access to the Internet Update site. 13. Windows Vista Ready The support for Windows Vista (UAC) is now complete. Windows Vista Manifest is now embedded into the Application. Windows Vista themes are now supported. Windows Registry modifications are now adapted. 14. Added Old Wireless Trace Formats Basic Support Basic functionalities of Old Wireless Trace File Formats are now available. Only UDP & DSR packets were fully tested. 15. Bug fixed: Node Movements Node movements when there are more than one movement of the same Node, at different times, are now fixed.
0.2.60
15-04-2008
0.2.61
08-05-2008
0.2.62
13-05-2008
0.2.63
14-05-2008
0.2.64
14-05-2008
16. Minor bug fixes: Minor bug fixes in the movements architecture and application algorithm. 17. Bug fixed: DSR Packets Appear DSR Packets were completely ignored. Now packets are shown and taken into account. 18. Bug fixed: Path-Shifts With Short Routes Routes with no node in between could raise an error. Routing Information (Path-Shifts) are now prepared for direct Routes Source -> Destination. 19. Added Advanced Route Information Now it is possible to view advanced route information like the dropped, lost and transferred packets. This feature appears as a Popup Menu in the Routing Information window. 20. Bug fixed: ARP in Old Wireless Trace Format Ignored Due to limitations of the format, the ARP protocol in Old Wireless Trace Format Files is ignored. Those packets throw errors in previous versions of the application. 21. Bug fixed: Save Graphic to CSV This feature was a little hidden. It is now more visible and saves graphics to CSV columns correctly. 22. Bug fixed: Graphic Window The caption of a Jitter graphic window was incorrect. 23. Improved Windows Vista Compatibility The application was made compatible with Windows Vista Operating System. A manifest was written to inform Windows Vista of application compatibility. 24. Bug fixed: Graphic Options User Interface The Graphic Options window has some minor bugs dealing with events. Because of that, some parameters weren't passed to the Graphic window. 25. Bug fixed: Save Graphic as Image This operation was not working very well on Windows Vista. The Save Dialog was unable to check what Image Type was selected. That is now corrected. 26. Bug fixed: Nodes Addresses There was a problem obtaining Nodes Addresses. 27. Note: LIndex (List Index) The application is not yet compatible with "lindex" TCL function. You will need to unloop the "for" cycles and create the nodes without the use of "lindex". I hope to add the feature of processing "lindex" soon.
0.2.65
15-05-2008
0.2.66
15-05-2008
0.2.67
15-05-2008
0.2.68
23-06-2008
0.2.69
24-06-2008
0.2.70
15-10-2008
0.2.71
06-02-2009
0.2.72
14-05-2009
This configuration sets the colour of the node n0 to red, and the colour of the node n1 to green. The application can read this configuration.
At time 1.0 second, node will start moving from its current location to (50, 100, 0.0) at speed of 1.37355696 m/s. You can know more about nodes positioning and movement at the following links:
http://www.winlab.rutgers.edu/~zhibinwu/html/ns2_wireless_scene.htm http://www.isi.edu/nsnam/ns/tutorial/nsscript7.html
The file output.tr will now be in the new trace file format. This is very important.
Dont forget to enable at least agentTrace, macTrace and movementTrace. This will allow the application to plot interesting graphics and to gather nodes movements.
4. Requirements
Operating System
o Windows XP / Vista / 7 (only user level permissions needed) o Linux (with Wine or other windows emulator)
Internet Connection
o Only needed to perform auto-update
5. Load Simulation
Loading the simulation files requires two steps: 1. You need to load the TCL file, so that the application can build the topology and get some extra parameters; 2. You need to load the trace file, with all packets information.
After loading the TCL file, the visual interface will open. You will be able to see the nodes position, colour and interact with the view.
10
Loading the Trace File can be an exhaustive task because the trace file can be very large. The process is multi-threaded, buffered and optimized to use the most computer processing power possible. An informative window will appear during the process, showing the current status of the loading process.
11
6. Statistics
This section describes how to get the node and flow statistics and their meaning.
12
This window displays all node information. Node Information The Node ID property displays the NS internal node identification. Usually a node can be identified by its internal id or its hierarchical id. The Disguise ID is for internal use only. The Virtual Node property hides the node from the visual canvas. This is useful if you dont want the node to appear in print-screens. The Type property allows changing the type of node from Wireless to Desktop, although this change only affects the icon in the list of nodes, not in the visual display yet. Nothing else is changed by this manual setting. The Hierarchical property displays the node id in the hierarchical form. General Tab At the level dependant properties you can see the node statistics by level, usually AGT (Agent), RTR (Routing) and MAC (Media Access Control). The Sent property displays the total data sent from the node. The Received property displays the total data received from the node. The Transferred property displays the total data received from the node, and which the node was the last hop (the destination). The Forwarded property displays the total data that was forwarded to other nodes (only counts explicit forward at the trace file). The Dropped property displays the total data properly dropped at the queue. The Lost property is for internal use only and displays the total data that was sent by the node but wasnt neither dropped nor received by the next hop. If this value is high, its probably related to a bad behaviour on the network, because all sent packets must be dropped or received. The Events section allows checking the duration of the communication and total data generated, the cover of the communication (for wireless communications), and all the first and last events.
13
Node Tab This tab isnt finished yet. It will allow seeing all the nodes that communicated with the selected node, and some statistics related with that communication.
This operation will open a window with the proper flow statistics.
The right part of the window isnt working yet. It would display the statistics depending on the packet destination.
14
The left part of the window displays some interesting statistics about the flow and the generated packets. The first section Data Generated specifies the impact of the flow in the overall generation of packets (of all flows). If this is the only flow in the simulation, this bar should be full, if this flow has generated few packets considering the overall of the other flows, this bar will be almost empty. The second section Data Dropped will consider the total packets generated, which percentage was dropped. The tabs Delay and Throughput are self-explanatory. The tab Connectivity displays the percentage of time the flow has been active considering the total simulation time and the first and last events of the flow.
This operation will open the flow statistics filtered by the specific route. This is very good to evaluate the specific route performance.
15
7. Graphics
The application has many graph capabilities. You can draw delay, jitter and throughput graphics. Please remember to change the Trace Level in the graphic options to AGT and adjust the Sync. Interval if you were expecting to see something and nothing appears. The graphic doesnt consider all levels, just one at the time. The following image is just a simple example of a delay (per packet) graphic.
16
Its possible to configure the graphic, save it as an image or export its data to CSV so you can import it in Excel or other similar application.
17