add QUICKSTART
[lttv.git] / ltt / branches / poly / QUICKSTART
CommitLineData
d9cd3a2e 1
2QUICKSTART
3
4How to use LTTng and LTTV in a few lines :
5
6These operations are made for installing LTTng 0.2 on a linux 2.6.12-rc2-mm2
7kernel. Change the versions to fit your needs.
8
9
10* Getting the LTTng packages
11
12su -
13mkdir /usr/src/lttng
14cd /usr/src/lttng
15(see http://ltt.polymtl.ca/lttng for package listing)
16wget http://ltt.polymtl.ca/lttng/lttng-modules-0.2.tar.bz2
17wget http://ltt.polymtl.ca/lttng/patch-2.6.12-rc4-mm2-lttng-0.2.bz2
18bzip2 -cd lttng-modules-0.2.tar.bz2 | tar xvof -
19
20
21* Getting LTTng kernel sources
22
23su -
24cd /usr/src
25wget http://kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.12-rc4.tar.bz2
26wget 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
27bzip2 -cd linux-2.6.12-rc4.tar.bz2 | tar xvof -
28cd linux-2.6.12-rc4
29bzip2 -cd ../2.6.12-rc4-mm2.bz2 | patch -p1
30bzip2 -cd /usr/src/lttng/patch-2.6.12-rc4-mm2-lttng-0.2.bz2 | patch -p1
31cd ..
32mv linux-2.6.12-rc4 linux-2.6.12-rc4-mm2-lttng-0.2
33
34
35* Installing a LTTng kernel
36
37su -
38cd /usr/src/linux-2.6.12-rc4-mm2-lttng-0.2
39make menuconfig
40 General setup
41 * Linux Trace Toolkit Instrumentation Support
42 M or * Linux Trace Toolkit Tracer
43 do NOT activate (not ready yet) :
44 Align Linux Trace Toolkit Traces
45 Activate Linux Trace Toolkit Heartbeat Timer
46make install
47reboot
48
49
50* Install the ltt-modules
51
52su -
53cd /usr/src/lttng/lttng-modules-0.2
54KERNELDIR=/usr/src/linux-2.6.12-rc4-mm2-lttng-0.2 make
55KERNELDIR=/usr/src/linux-2.6.12-rc4-mm2-lttng-0.2 make modules_install
56
57note : at this stage, you might want to execute
58modprobe ltt-control
59
60and you might also want to do this :
61echo ltt-control >> /etc/modules
62
63
64* Getting and installing the LTTV package
65
66su -
67cd /usr/src
68wget http://ltt.polymtl.ca/packages/LinuxTraceToolkitViewer-0.5-16092005.tar.gz
69gzip -cd LinuxTraceToolkitViewer-0.5-16092005.tar.gz | tar xvof -
70cd LinuxTraceToolkitViewer-0.5-16092005
71./configure
72make
73make install
74
75* Use LTTV
76
77lttv-gui (or /usr/local/bin/lttv-gui)
78 - Spot the "Trace Control" icon : click on it
79 - enter the root password
80 - click "start"
81 - click "stop"
82 - Yes
83 * You should now see a trace
84
85
86* Getting and installing genevent
87
88u -
89cd /usr/src
90wget http://ltt.polymtl.ca/packages/genevent-0.1.tar.gz
91gzip -cd genevent-0.1.tar.gz | tar xvof -
92cd genevent-0.1
93make
94make install
95
96
97* Add new events to the kernel with genevent
98
99su -
100cd /usr/local/share/LinuxTraceToolkitViewer/facilities
101cp process.xml yourfacility.xml
102 * edit yourfacility.xml to fit your needs.
103cd /tmp
104/usr/local/bin/genevent /usr/local/share/LinuxTraceToolkitViewer/yourfacility.xml
105cp ltt-facility-yourfacility.h ltt-facility-id-yourfacility.h \
106 /usr/src/linux-2.6.12-rc4-mm2-lttng-0.2/include/linux/ltt
107cp ltt-facility-loader-yourfacility.c ltt-facility-loader-yourfacility.h \
108 /usr/src/linux-2.6.12-rc4-mm2-lttng-0.2/ltt
109 * edit the kernel file you want to instrument
110 - Add #include <linux/ltt/ltt-facility-yourfacility.h> at the beginning
111 of the file.
112 - Add a call to the tracing functions. See their names and parameters in
113 /usr/src/linux-2.6.12-rc4-mm2-lttng-0.2/include/linux/ltt/ltt-facility-yourfacility.h
114
115
116
This page took 0.025291 seconds and 4 git commands to generate.