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