quickstart formatting
[lttv.git] / ltt / branches / poly / QUICKSTART
CommitLineData
d9cd3a2e 1
2QUICKSTART
3
4How to use LTTng and LTTV in a few lines :
5
6c913994 6This document is made of four parts : The first one explains how to install
7LTTng and LTTV from Debian and RPM binary packages, the second one explains how
8to install LTTng and LTTV from sources and the third one describes the steps
9to follow to trace a system and view it. The fourth and last part explains
10briefly how to add a new trace point to the kernel.
11
12What you will typically want is to read sections 1 and 3 : install LTTng from
13binary packages and use it. If there are no packages ready for your system, you
14will have to install from sources (section 2) instead.
15
d9cd3a2e 16These operations are made for installing LTTng 0.2 on a linux 2.6.12-rc2-mm2
17kernel. Change the versions to fit your needs.
18
af88bd8a 19Author : Mathieu Desnoyers, September 2005
20
d9cd3a2e 21
6c913994 22
23***********************************************************
24** Section 1 * Installation from Debian or RPM packages **
25***********************************************************
26
27No Debian or RPM packages are ready yet.
28
29TODO
30
31
32***********************************************************
33** Section 2 * Installation from sources **
34***********************************************************
35
d9cd3a2e 36* Getting the LTTng packages
37
38su -
39mkdir /usr/src/lttng
40cd /usr/src/lttng
41(see http://ltt.polymtl.ca/lttng for package listing)
42wget http://ltt.polymtl.ca/lttng/lttng-modules-0.2.tar.bz2
4408c54c 43wget http://ltt.polymtl.ca/lttng/patch-2.6.12-rc4-mm2-lttng-0.3.bz2
d9cd3a2e 44bzip2 -cd lttng-modules-0.2.tar.bz2 | tar xvof -
45
46
47* Getting LTTng kernel sources
48
49su -
50cd /usr/src
51wget http://kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.12-rc4.tar.bz2
52wget http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.12-rc4/2.6.12-rc4-mm2/2.6.12-rc4-mm2.bz2
53bzip2 -cd linux-2.6.12-rc4.tar.bz2 | tar xvof -
54cd linux-2.6.12-rc4
55bzip2 -cd ../2.6.12-rc4-mm2.bz2 | patch -p1
4408c54c 56bzip2 -cd /usr/src/lttng/patch-2.6.12-rc4-mm2-lttng-0.3.bz2 | patch -p1
d9cd3a2e 57cd ..
4408c54c 58mv linux-2.6.12-rc4 linux-2.6.12-rc4-mm2-lttng-0.3
d9cd3a2e 59
60
61* Installing a LTTng kernel
62
63su -
4408c54c 64cd /usr/src/linux-2.6.12-rc4-mm2-lttng-0.3
d9cd3a2e 65make menuconfig
66 General setup
67 * Linux Trace Toolkit Instrumentation Support
68 M or * Linux Trace Toolkit Tracer
69 do NOT activate (not ready yet) :
70 Align Linux Trace Toolkit Traces
71 Activate Linux Trace Toolkit Heartbeat Timer
7bfce92a 72 IMPORTANT : This is enabled by default : you must disable it!
02bc6879 73make
d9cd3a2e 74make install
26d45a39 75make modules_install
d9cd3a2e 76reboot
77
78
79* Install the ltt-modules
80
81su -
82cd /usr/src/lttng/lttng-modules-0.2
4408c54c 83KERNELDIR=/usr/src/linux-2.6.12-rc4-mm2-lttng-0.3 make
84KERNELDIR=/usr/src/linux-2.6.12-rc4-mm2-lttng-0.3 make modules_install
d9cd3a2e 85
86note : at this stage, you might want to execute
87modprobe ltt-control
88
89and you might also want to do this :
90echo ltt-control >> /etc/modules
91
92
93* Getting and installing the LTTV package
94
95su -
96cd /usr/src
97wget http://ltt.polymtl.ca/packages/LinuxTraceToolkitViewer-0.5-16092005.tar.gz
98gzip -cd LinuxTraceToolkitViewer-0.5-16092005.tar.gz | tar xvof -
99cd LinuxTraceToolkitViewer-0.5-16092005
100./configure
101make
102make install
103
6c913994 104
105
106
107***********************************************************
108** Section 3 * Using LTTV **
109***********************************************************
110
111* Use graphical LTTV
d9cd3a2e 112
113lttv-gui (or /usr/local/bin/lttv-gui)
114 - Spot the "Trace Control" icon : click on it
115 - enter the root password
116 - click "start"
117 - click "stop"
118 - Yes
119 * You should now see a trace
120
6c913994 121* Use text mode LTTV
122
123Fell free to look in /usr/local/lib/lttv/plugins to see all the text and
124graphical plugins available.
125
126For example, a simple trace dump in text format is available with :
127
128lttv -m textDump -t /tmp/trace
129
130see lttv -m textDump --help for detailed command line options of textDump.
131
132
133
134
135***********************************************************
136** Section 4 * Adding new instrumentations with genevent **
137***********************************************************
d9cd3a2e 138
139* Getting and installing genevent
140
cb598ad7 141su -
d9cd3a2e 142cd /usr/src
143wget http://ltt.polymtl.ca/packages/genevent-0.1.tar.gz
144gzip -cd genevent-0.1.tar.gz | tar xvof -
145cd genevent-0.1
146make
147make install
148
149
150* Add new events to the kernel with genevent
151
152su -
153cd /usr/local/share/LinuxTraceToolkitViewer/facilities
154cp process.xml yourfacility.xml
155 * edit yourfacility.xml to fit your needs.
156cd /tmp
157/usr/local/bin/genevent /usr/local/share/LinuxTraceToolkitViewer/yourfacility.xml
158cp ltt-facility-yourfacility.h ltt-facility-id-yourfacility.h \
4408c54c 159 /usr/src/linux-2.6.12-rc4-mm2-lttng-0.3/include/linux/ltt
d9cd3a2e 160cp ltt-facility-loader-yourfacility.c ltt-facility-loader-yourfacility.h \
4408c54c 161 /usr/src/linux-2.6.12-rc4-mm2-lttng-0.3/ltt
d9cd3a2e 162 * edit the kernel file you want to instrument
163 - Add #include <linux/ltt/ltt-facility-yourfacility.h> at the beginning
164 of the file.
165 - Add a call to the tracing functions. See their names and parameters in
4408c54c 166 /usr/src/linux-2.6.12-rc4-mm2-lttng-0.3/include/linux/ltt/ltt-facility-yourfacility.h
d9cd3a2e 167
168
169
This page took 0.028545 seconds and 4 git commands to generate.