Add quick start tracing guide
[lttng-tools.git] / doc / quickstart.txt
CommitLineData
e7651054
DG
1QUICKSTART
2--------------
3
4This is a quick start guide for the complete LTTng tool chain. This is divided
5in three sections respectively Kernel tracing, user-space tracing and reading a
6trace.
7
8See the README file for installation procedure or use the various Linux
9distribution packages.
10
11In order to trace the Kernel, you'll need the lttng-modules >= 2.0 compiled and
12installed. See http://lttng.org/content/lttng-kernel-tracer for more
13instructions for that part. For user-space tracing, you'll need an instrumented
14application, please see http://lttng.org/ust
15
16lttng-tools provide a session daemon (ltt-sessiond) that acts as a tracing
17registry. To trace any instrumented applications or the kernel, a registered
18tracing session is needed.
19
20To interact with the session daemon and a tracing session, you can use the
21lttng command line UI (lttng).
22
23The next sections explain how to do tracing :)
24
25Kernel Tracing
26--------------
27
28You have to modprobe the lttng-modules manually or the session daemon will do
29it for you if they can be found on your system.
30
31You can then start the session daemon by hand or the lttng command line tool
32will do it for you.
33
34List possible kernel events:
35
36# lttng list -k
37
381) Create a tracing session. A .lttngrc will be created in $HOME containing
39the session name (here 'mysession') you are working on.
40
41# lttng create mysession
42
432) Enable event(s). Here for example, we want only 'sched_switch' and
44'sys_enter' events for the kernel (-k/--kernel).
45
46# lttng enable-event sched_switch,sys_enter -k
47
48or enable ALL events (-a/--all):
49
50# lttng enable-event -a -k
51
523) Start tracing:
53
54# lttng start
55
56Tracing is in progress at this point and will be written in
57$HOME/lttng-traces/mysession-<date>-<time>
58
594) Stop tracing:
60
61# lttng stop
62
635) Destroy your session after you are done with tracing
64
65# lttng destroy
66
67User-space Tracing
68--------------
69
70User-space tracer 2.0 not released at this point. You'll have to use 'ustctl'
71to control user-space tracing.
72
73Reading a trace
74--------------
75
76To read your trace, you'll need babeltrace which will text dump your the trace.
77Please see http://www.efficios.com/ctf and git tree
78http://git.efficios.com/?p=babeltrace.git
79
80# babeltrace -n $HOME/lttng-traces/mysession-<date>-<time> | less
81
82VoilĂ !
This page took 0.024841 seconds and 4 git commands to generate.