| 1 |
Example using LTTng TMF Eclipse Plugin with Example SystemTap Script proc_snoop.stp |
| 2 |
|
| 3 |
1. Installing the Plugin |
| 4 |
- Follow instructions given below to setup and run the LTTng parsing library |
| 5 |
and TMF eclipse plugin: |
| 6 |
- Parsing library: http://wiki.eclipse.org/Linux_Tools_Project/LTTng |
| 7 |
- TMF eclipse plugin: http://lttng.org/eclipse |
| 8 |
|
| 9 |
|
| 10 |
2. Importing the Parser |
| 11 |
- Once you have it up and running in eclipse, open the LTTng perspective. |
| 12 |
- Window > Open Perspective > Other... > LTTng |
| 13 |
|
| 14 |
- Open the TMF/Projects view. |
| 15 |
- Window > Show View > Other... > TMF > Projects |
| 16 |
|
| 17 |
- Open Manage Custom Parsers page |
| 18 |
- Click the downward pointing arrow in the top right corner of the |
| 19 |
TMF/Projects view. |
| 20 |
|
| 21 |
- Import the proc_snoop_parser.xml parser from: |
| 22 |
systemtap/testsuite/systemtap.examples/process/proc_snoop_parser.xml |
| 23 |
|
| 24 |
|
| 25 |
3. Running the Script |
| 26 |
- Create a folder somewhere to store the tracefile. |
| 27 |
- e.g. $ mkdir ~/Desktop/tracefile |
| 28 |
|
| 29 |
- Run the proc_snoop.stp script and pipe the output to a file in the above |
| 30 |
folder. Let it run for a few seconds so you get a number of lines of output, |
| 31 |
then stop it with ctrl-c. Look in the file and make sure there are less than |
| 32 |
50,000 lines before continuing. If there are more (or none) run the script |
| 33 |
again, adjusting the running time accordingly. |
| 34 |
|
| 35 |
$ stap systemtap/testsuite/systemtap.examples/ |
| 36 |
process/proc_snoop.stp > ~/Desktop/tracefile/tracefile.txt |
| 37 |
|
| 38 |
|
| 39 |
4. Parsing the File |
| 40 |
- In the TMF/Projects view, right click and choose "Import Trace". |
| 41 |
- Right click again, and choose "New Experiment". Name it and click "OK". |
| 42 |
- Right click on the new experiment and choose "Select Traces". Choose |
| 43 |
tracefile.txt. |
| 44 |
- In the new experiment, right click on tracefile.txt and choose |
| 45 |
- Select Parser > Custom > Proc_Snoop_Parser |
| 46 |
- Double Click on the tracefile to parse it. It will show up in a neatly |
| 47 |
parsed list. |
| 48 |
|
| 49 |
NOTE: Due to the limitations of the custom text parser, the views |
| 50 |
that use timestamp information will not function properly with this |
| 51 |
script. Currently, to be able to use those views, timestamps must be in |
| 52 |
the form of the SimpleDateFormat class- they cannot be just a large, |
| 53 |
increasing number such as 43928472. |
| 54 |
|