Search This Blog

[ns-3] TraceMetrics: A trace file analyzer for ns-3

Labels: , , ,

Reactions: 

TraceMetrics, developed in Java, is an open source trace file analyzer for analyzing the trace files (.tr) of ns-3 [1]. TraceMetrics does not require installation! You just need to have Java installed on your machine to use it.

Prerequisites for working with TraceMetrics: JDK 7 must be installed on your machine.

Command to install JDK 7 on Ubuntu OS is:

sudo apt-get install openjdk-7-jdk

Before we proceed to work with TraceMetrics, it is important that we have a ns-3 trace file which we can analyze with TraceMetrics. To get the ns-3 trace file, follow any one of the three options given below:

Option 1: If you have already installed ns-3, follow the steps given below:

1. Copy the file named

tcp-bulk-send.cc 

from this directory: ns-allinone-3.xx/ns-3.xx/examples/tcp

and paste it into the following directory: ns-allinone-3.xx/ns-3.xx/scratch

2. Go to ns-allinone-3.xx/ns-3.xx via terminal and give the following command to run tcp-bulk-send.cc

./waf --run "scratch/tcp-bulk-send --tracing=true"

3. If the above mentioned command is successful, search for a file named "tcp-bulk-send.tr" in your ns-allinone-3.xx/ns-3.xx directory.

If you find "tcp-bulk-send.tr", then your trace file is ready for analysis. "tcp-bulk-send.tr" is the trace file which will be analyzed by TraceMetrics.

You may Skip Option 2 and Option 3 and directly read "How to use TraceMetrics" Section!

Option 2: If you have not yet installed ns-3, follow the steps given below:

1. Install ns-3. I have written a separate post for installation of ns-3. Here is the link:


2. After successfully installing ns-3, follow the steps given in "Option 1" of this post.

Option 3: If you just want to see how TraceMetrics works and would like to generate your trace files at a later point, just download the "tcp-bulk-send.tr" from the link given below:

Download tcp-bulk-send.tr

How to use TraceMetrics

Follow the steps given below to start analyzing "tcp-bulk-send.tr" by using TraceMetrics:

1. Download TraceMetrics from the following link:


2. Unzip the downloaded file i.e., tracemetrics-1.3.0.zip.

3. Go in the extracted folder i.e., tracemetrics and open the file named "tracemetrics.jar". You should see tracemetrics loading like shown in the Image below:

[Click on the Image to enlarge]

and then the following window should open:

[Click on the Image to enlarge]

4. Select File -> Choose File and then navigate to the folder where you stored "tcp-bulk-send.tr". Select "tcp-bulk-send.tr"

5. The next window that appears will look like the Image shown below:

[Click on the Image to enlarge]

6. Click on "Execute analysis" button on the bottom right corner.

You are done with it!

NOTE: A wonderful tutorial on how to analyze the parameters is provided by the developers of TraceMetrics. You can download it from the following link:


References:

[1] TraceMetrics Official Webpage: http://www.tracemetrics.net/

Hope it helps.

Best Regards,
Mohit P. Tahiliani

Comments (0)

Guest Book...!!!