add QUICKSTART
[lttv.git] / ltt / branches / poly / QUICKSTART
1
2 QUICKSTART
3
4 How to use LTTng and LTTV in a few lines :
5
6 These operations are made for installing LTTng 0.2 on a linux 2.6.12-rc2-mm2
7 kernel. Change the versions to fit your needs.
8
9
10 * Getting the LTTng packages
11
12 su -
13 mkdir /usr/src/lttng
14 cd /usr/src/lttng
15 (see http://ltt.polymtl.ca/lttng for package listing)
16 wget http://ltt.polymtl.ca/lttng/lttng-modules-0.2.tar.bz2
17 wget http://ltt.polymtl.ca/lttng/patch-2.6.12-rc4-mm2-lttng-0.2.bz2
18 bzip2 -cd lttng-modules-0.2.tar.bz2 | tar xvof -
19
20
21 * Getting LTTng kernel sources
22
23 su -
24 cd /usr/src
25 wget http://kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.12-rc4.tar.bz2
26 wget 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
27 bzip2 -cd linux-2.6.12-rc4.tar.bz2 | tar xvof -
28 cd linux-2.6.12-rc4
29 bzip2 -cd ../2.6.12-rc4-mm2.bz2 | patch -p1
30 bzip2 -cd /usr/src/lttng/patch-2.6.12-rc4-mm2-lttng-0.2.bz2 | patch -p1
31 cd ..
32 mv linux-2.6.12-rc4 linux-2.6.12-rc4-mm2-lttng-0.2
33
34
35 * Installing a LTTng kernel
36
37 su -
38 cd /usr/src/linux-2.6.12-rc4-mm2-lttng-0.2
39 make 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
46 make install
47 reboot
48
49
50 * Install the ltt-modules
51
52 su -
53 cd /usr/src/lttng/lttng-modules-0.2
54 KERNELDIR=/usr/src/linux-2.6.12-rc4-mm2-lttng-0.2 make
55 KERNELDIR=/usr/src/linux-2.6.12-rc4-mm2-lttng-0.2 make modules_install
56
57 note : at this stage, you might want to execute
58 modprobe ltt-control
59
60 and you might also want to do this :
61 echo ltt-control >> /etc/modules
62
63
64 * Getting and installing the LTTV package
65
66 su -
67 cd /usr/src
68 wget http://ltt.polymtl.ca/packages/LinuxTraceToolkitViewer-0.5-16092005.tar.gz
69 gzip -cd LinuxTraceToolkitViewer-0.5-16092005.tar.gz | tar xvof -
70 cd LinuxTraceToolkitViewer-0.5-16092005
71 ./configure
72 make
73 make install
74
75 * Use LTTV
76
77 lttv-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
88 u -
89 cd /usr/src
90 wget http://ltt.polymtl.ca/packages/genevent-0.1.tar.gz
91 gzip -cd genevent-0.1.tar.gz | tar xvof -
92 cd genevent-0.1
93 make
94 make install
95
96
97 * Add new events to the kernel with genevent
98
99 su -
100 cd /usr/local/share/LinuxTraceToolkitViewer/facilities
101 cp process.xml yourfacility.xml
102 * edit yourfacility.xml to fit your needs.
103 cd /tmp
104 /usr/local/bin/genevent /usr/local/share/LinuxTraceToolkitViewer/yourfacility.xml
105 cp ltt-facility-yourfacility.h ltt-facility-id-yourfacility.h \
106 /usr/src/linux-2.6.12-rc4-mm2-lttng-0.2/include/linux/ltt
107 cp 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.031899 seconds and 4 git commands to generate.