Tracegraph is a great application that comes handy to ns2 users. It eliminates the need to configure and run perl/awk scripts over the trace file. Trace file analysis simplified. Though I feel that Tracegraph is still in its infancy, its existing scope just provides all that a researcher using ns2 needs.
The steps mentioned in this post were tested to be successful in Ubuntu 10.10 and I believe it would work in other Linux distros and Ubuntu versions too.(Remember that the command sudo doesn’t work in non-debian distributions of Linux.)
First, Download the following packages:
Tracegraph seems to have been developed using Matlab and therefore supporting code is needed make it run in Linux. This is the reason behind installing mglinstaller.
Extract tracegraph202linux.tar.gz in your homefolder. In my case this would result in /home/micman/tracegraph202
Next extract mglinstaller.gz into /home/micman/tracegraph202
A single executable named mglinstaller would appear in the tracegraph202 folder.
Next, provide executable permission to mglinstaller and run it using the following command:
$sudo chmod 777 mglinstaller
You would then be prompted with an information, all you have to do is to hit ENTER.
This would create a new folder named glnx86 in the following location: /home/micman/tracegraph202/bin/
Next, copy all the folders and files in /home/micman/tracegraph202/ location and paste them into /home/micman/tracegraph202/bin/glnx86/
Finally, enter the following line in Terminal:
$ sudo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/micman/tracegraph202/bin/glnx86
Remember, micman in the above line is my account name, replace it with your account name(user name).
Exit the Terminal and Re-invoke it.
Now, navigate to this location: /home/micman/tracegraph202/bin/glnx86/
$ cd /home/micman/tracegraph202/bin/glnx86
List all the files in this location
you would see an executable named trgraph in this location.Provide executable permission to this file and execute it.
$ sudo su
# chmod 777 trgraph
To run tracegraph every time, just navigate to /home/micman/tracegraph202/bin/glnx86 in Terminal and execute trgraph as follows:
Tip by Siddharth
Place the trgraph executable in the location /usr/bin/ so that you can execute it from the Terminal without having to “cd” into the installation directory everytime. The command to copy the trgraph executable into /usr/bin/ looks like this:
$ sudo cp /home/micman/tracegraph202/bin/glnx86/trgraph /usr/bin
If you encounter an error something like the following:
bash: ./trgraph: No such file or directory
It is probably because you are trying to run this tracegraph on a 64-bit machione.
To fix this issue, you need to install 32bit libraries, by running the following command in the Terminal:
sudo apt-get install ia32-libs
after this you can just execute ./trgraph as mentioned in the tutorial.
This link helped me find this solution.