Installing Tracegraph2.02 application in Ubuntu

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:

<Download Tracegraph>

<Download Mglinstaller>

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

 

$./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

$ ls 

you would see an executable named trgraph in this location.Provide executable permission to this file and execute it.

$ sudo su 

 

# chmod 777 trgraph

 

# ./trgraph

To run tracegraph every time, just navigate to /home/micman/tracegraph202/bin/glnx86 in Terminal and execute trgraph as follows:

$ ./trgraph 

UPDATES:

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

Update

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.

Was this post helpful? Then thank me by clicking <this link>

About these ads

19 comments on “Installing Tracegraph2.02 application in Ubuntu

  1. Instead of ‘cd’ing to the

    /home/micman/tracegraph202/bin/glnx86
    

    every time when you want open trgraph, you may put the trgraph file into /usr/bin/ directory. As a consequence of doing this you will be able to execute the trgraph application from any directory.

    The shell command to do this will look like :

    $ sudo cp /home/micman/tracegraph202/bin/glnx86/trgraph /usr/bin
    

    Now you may execute trgraph from anywhere. Also as you have put the file ( trgraph) in /usr/bin, any user in the system will be able to run the application. Please correct me if the last statement that I have made is wrong ( ’cause I really not sure whether that is right )

    Hope that was helpful. I did what I just told for firefox4 in my computer. I put the executable file in /usr/bin/ directory and I run firefox4 when I am ‘siddharth‘ and also when I am ‘janitor‘. I work as two users in my computer. One as a ‘normal’ user ( that is siddharth) and other with administrative privilege ( janitor)

    R.Siddharth.

  2. 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.

    I strongly feel we need to give the GNU project some credit. Linux is just the kernel and approximately is only 3 % of the whole operating. The operating systems ( the distros) which use Linux as it’s kernel contains a lot of programs which belong to the GNU project. Therefore it is appropriate to call the respective distro as “DISTRIBUTION_NAME GNU/Linux”. For instance, Debian is referred to as Debian GNU/Linux in debian’s website. Take a look : http://www.debian.org

    Read an article by Richard Stallman on this issue :
    What’s in a Name ?

  3. Ok I will follow this in my future posts. The reason I avoid such jargons is to not to frighten people who are new to Linux!

  4. The reason I avoid such jargons is to not to frighten people who are new to Linux!

    It is not jargon, it is just about the acknowledgment that the GNU project deserves. Also it is very important to make people know about GNU because most people are still under the impression that Linux is a operating system which is a blatant fallacy.

    Please make people aware of GNU, it is from which everything started. I thank you.

    R.Siddharth.

  5. Hi,

    I want to know how to use this trace graph. As whenever i open a trace file using the tracegraph, it just freezes… :(

  6. angel@ubuntu:~/tracegraph202/bin/glnx86$ ls
    copyright.txt doc mglinstaller stats.fig trgraph.cfg
    dataread.mexglx graphs.fig sortcellchar.mexglx trgraph trgraph.fig
    angel@ubuntu:~/tracegraph202/bin/glnx86$ sudo su
    root@ubuntu:/home/angel/tracegraph202/bin/glnx86# chmod 777 trgraph
    root@ubuntu:/home/angel/tracegraph202/bin/glnx86# ./trgraph
    ./trgraph: error while loading shared libraries: libmwsgl.so: cannot open shared object file: No such file or directory

    …………………………………………………………………………..
    Now what should i Do.. ??

  7. I don’t know about it?

    Next, copy all the folders and files in /home/micman/tracegraph202/ location and paste them into /home/micman/tracegraph202/bin/glnx86/

  8. when i uesd this line ” $ sudo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/micman/tracegraph202/bin/glnx86 ”
    i get this error
    sudo: export: command not found
    can you please tell me why i get this and how to fix it

  9. @hz87:
    You don’t use “sudo”, your line:
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/micman/tracegraph202/bin/glnx86
    Good luck!

  10. @phrairin:
    You can copy, paste by hand or by command:
    cp /home/micman/tracegraph202/ /home/micman/tracegraph202/bin/glnx86/
    Hope it can use for you!

  11. when i uesd this line ” $ sudo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/micman/tracegraph202/bin/glnx86 ”
    i got this error
    sudo: export: command not found

    i have changed micman with my account name but still found this error

    sudo: export: command not found
    can you please tell me why i get this and how to fix it

  12. hi i m installing trgraph by using the same steps but it is giving me an error while running trgraph like:
    ./trgraph

    bash: ./trgraph: No such file or directory

  13. I solved export error not writing sudo but this time I got ./trgraph: error while loading shared libraries: l ibmwsgl.so: cannot open shared object file: No such file or directory

  14. Hi Nidhi Malhotra ! U just dont need to type command “sudo su”
    Also hz87 : dont need sudo, just only :
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/micman/tracegraph202/bin/glnx86

  15. Pingback: Help error Ns2

  16. i followed the steps given by you
    but i gt I got ./trgraph: error while loading shared libraries: l ibmwsgl.so: cannot open shared object file: No such file or directory

    how can i resolve this problem?

  17. @Nidhi ,Kiran…The error which u were getting ,the same i was getting but don’t worry .tracegraph will execute then also just change the path of tracegraph to glx86 folder and run ./trgraph …it will run

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s