Remove latin abbreviations
[lttng-docs.git] / contents / nuts-and-bolts / intro.md
CommitLineData
5e0cbfb0
PP
1---
2id: nuts-and-bolts
3---
4
5What is LTTng? As its name suggests, the
6_Linux Trace Toolkit: next generation_ is a modern toolkit for
7tracing Linux systems and applications. So your first question might
8rather be: **what is tracing?**
9
10As the history of software engineering progressed and led to what
11we now take for granted—complex, numerous and
12interdependent software applications running in parallel on
13sophisticated operating systems like Linux—the authors of such
14components, or software developers, began feeling a natural
15urge of having tools to ensure the robustness and good performance
16of their masterpieces.
17
18One major achievement in this field is, inarguably, the
19<a href="https://www.gnu.org/software/gdb/" class="ext">GNU debugger
20(GDB)</a>, which is an essential tool for developers to find and fix
21bugs. But even the best debugger won't help make your software run
935eda36 22faster, and nowadays, faster software means either more work done by
5e0cbfb0
PP
23the same hardware, or cheaper hardware for the same work.
24
25A _profiler_ is often the tool of choice to identify performance
935eda36 26bottlenecks. Profiling is suitable to identify _where_ performance is
5e0cbfb0
PP
27lost in a given software; the profiler outputs a profile, a
28statistical summary of observed events, which you may use to know
29which functions took the most time to execute. However, a profiler
30won't report _why_ some identified functions are the bottleneck.
31Also, bottlenecks might only occur when specific conditions are met.
32For a thorough investigation of software performance issues, a history
33of execution, with historical values of chosen variables, is
34essential. This is where tracing comes in handy.
35
36_Tracing_ is a technique used to understand what goes on in a running
37software system. The software used for tracing is called a _tracer_,
38which is conceptually similar to a tape recorder. When recording,
39specific points placed in the software source code generate events
40that are saved on a giant tape: a _trace_ file. Both user applications
41and the operating system may be traced at the same time, opening the
42possibility of resolving a wide range of problems that are otherwise
43extremely challenging.
44
45Tracing is often compared to _logging_. However, tracers and loggers
935eda36 46are two different types of tools, serving two different purposes. Tracers are
5e0cbfb0
PP
47designed to record much lower-level events that occur much more
48frequently than log messages, often in the thousands per second range,
49with very little execution overhead. Logging is more appropriate for
50very high-level analysis of less frequent events: user accesses,
4d46e8c0 51exceptional conditions (errors and warnings, for example), database
5e0cbfb0
PP
52transactions, instant messaging communications, etc. More formally,
53logging is one of several use cases that can be accomplished with
54tracing.
55
56The list of recorded events inside a trace file may be read manually
57like a log file for the maximum level of detail, but it is generally
58much more interesting to perform application-specific analyses to
59produce reduced statistics and graphs that are useful to resolve a
60given problem. Trace viewers and analysers are specialized tools which
61achieve this.
62
63So, in the end, this is what LTTng is: a powerful, open source set of
64tools to trace the Linux kernel and user applications. LTTng is
65composed of several components actively maintained and developed by
dcb04fcd 66its <a href="/community/#where" class="ext">community</a>.
5e0cbfb0
PP
67
68Excluding proprietary solutions, a few competing software tracers
69exist for Linux.
70<a href="https://www.kernel.org/doc/Documentation/trace/ftrace.txt" class="ext">ftrace</a>
71is the de facto function tracer of the Linux kernel.
72<a href="http://linux.die.net/man/1/strace" class="ext">strace</a>
73is able to record all system calls made by a user process.
74<a href="https://sourceware.org/systemtap/" class="ext">SystemTap</a>
75is a Linux kernel and user space tracer which uses custom user scripts
76to produce plain text traces.
77<a href="http://www.sysdig.org/" class="ext">sysdig</a>
78also uses scripts, written in Lua, to trace and analyze the Linux
79kernel.
80
81The main distinctive features of LTTng is that it produces correlated
82kernel and user space traces, as well as doing so with the lowest
83overhead amongst other solutions. It produces trace files in the
84<a href="http://www.efficios.com/ctf" class="ext"><abbr title="Common Trace Format">CTF</abbr></a>
85format, an optimized file format for production and analyses of
86multi-gigabyte data. LTTng is the result of close to 10 years of
87active development by a community of passionate developers. It is
935eda36 88currently available on all major desktop, server, and embedded Linux
5e0cbfb0
PP
89distributions.
90
91The main interface for tracing control is a single command line tool
92named `lttng`. The latter can create several tracing sessions,
93enable/disable events on the fly, filter them efficiently with custom
94user expressions, start/stop tracing and do much more. Traces can be
95recorded on disk or sent over the network, kept totally or partially,
96and viewed once tracing is inactive or in real-time.
97
98[Install LTTng now](#doc-installing-lttng) and start tracing!
This page took 0.026194 seconds and 4 git commands to generate.