3.5.2.3. Manually copying a trace to the host and viewing it in Eclipse (i.e. using Eclipse without network support)

If you already have an LTTng trace on a remote target and would like to view it in Eclipse on the host, you can easily copy it from the target to the host and import it into Eclipse to view it using the LTTng Eclipse plug-in already bundled in the Eclipse (Juno SR1 or greater).

Using the trace we created in the previous section, archive it and copy it to your host system:

     root@crownbay:~/lttng-traces# tar zcvf auto-20121015-232120.tar.gz auto-20121015-232120
     auto-20121015-232120/
     auto-20121015-232120/kernel/
     auto-20121015-232120/kernel/metadata
     auto-20121015-232120/kernel/channel0_1
     auto-20121015-232120/kernel/channel0_0

     $ scp root@192.168.1.47:lttng-traces/auto-20121015-232120.tar.gz .
     root@192.168.1.47's password:
     auto-20121015-232120.tar.gz                                             100% 1566KB   1.5MB/s   00:01
                

Unarchive it on the host:

     $ gunzip -c auto-20121015-232120.tar.gz | tar xvf -
     auto-20121015-232120/
     auto-20121015-232120/kernel/
     auto-20121015-232120/kernel/metadata
     auto-20121015-232120/kernel/channel0_1
     auto-20121015-232120/kernel/channel0_0
                

We can now import the trace into Eclipse and view it:

  1. First, start eclipse and open the 'LTTng Kernel' perspective by selecting the following menu item:

         Window | Open Perspective | Other...
                            
  2. In the dialog box that opens, select 'LTTng Kernel' from the list.

  3. Back at the main menu, select the following menu item:

         File | New | Project...
                            
  4. In the dialog box that opens, select the 'Tracing | Tracing Project' wizard and press 'Next>'.

  5. Give the project a name and press 'Finish'.

  6. In the 'Project Explorer' pane under the project you created, right click on the 'Traces' item.

  7. Select 'Import..." and in the dialog that's displayed:

  8. Browse the filesystem and find the select the 'kernel' directory containing the trace you copied from the target e.g. auto-20121015-232120/kernel

  9. 'Checkmark' the directory in the tree that's displayed for the trace

  10. Below that, select 'Common Trace Format: Kernel Trace' for the 'Trace Type'

  11. Press 'Finish' to close the dialog

  12. Back in the 'Project Explorer' pane, double-click on the 'kernel' item for the trace you just imported under 'Traces'

You should now see your trace data displayed graphically in several different views in Eclipse:

You can access extensive help information on how to use the LTTng plug-in to search and analyze captured traces via the Eclipse help system:

     Help | Help Contents | LTTng Plug-in User Guide