Commit | Line | Data |
---|---|---|
c263c4eb | 1 | LTTngTop |
1fc22eb4 | 2 | Julien Desfossez <julien.desfossez@polymtl.ca> |
661ad2e0 | 3 | April 2012 |
1fc22eb4 JD |
4 | |
5 | Lttngtop is an ncurses interface for reading and browsing traces recorded by | |
6 | the LTTng tracer and displaying various statistics. | |
661ad2e0 JD |
7 | As of now, the cpu usage, per file/process I/O bandwidth and perf counters are |
8 | displayed. This version currently only supports offline traces, but a live | |
9 | version is in alpha and will be available for testing soon. | |
1fc22eb4 JD |
10 | |
11 | USAGE | |
12 | ----- | |
13 | ||
14 | Record a trace with LTTng 2.0 with at least the sched_switch event, and the pid, | |
15 | procname, tid, ppid contexts. To have the perftop view working you can enable | |
16 | any number of perf contexts (depending on your hardware). | |
17 | For the iotop view, you need to have some syscall events : sys_read, sys_write | |
18 | and exit_syscall. | |
19 | ||
20 | Once your trace is recorded, you can use lttngtop this way : | |
21 | $ lttngtop /path/to/your/trace | |
22 | ||
23 | Make sure you have read permissions on the whole directory. | |
24 | ||
1fc22eb4 JD |
25 | EXAMPLE |
26 | ------- | |
bc02a7aa YB |
27 | # Get root (or ideally just launch lttng-sessiond as root) |
28 | lttng create lttngtop | |
29 | lttng enable-event -k sched_switch | |
30 | lttng add-context -k -t pid -t procname -t tid -t ppid -t perf:cache-misses \ | |
1fc22eb4 | 31 | -t perf:major-faults -t perf:branch-load-misses |
bc02a7aa YB |
32 | lttng start |
33 | #...do stuff... | |
34 | lttng stop | |
35 | lttng destroy | |
1fc22eb4 | 36 | |
bc02a7aa YB |
37 | # Run lttngtop |
38 | lttngtop $HOME/lttng-traces/lttngtop-... | |
1fc22eb4 JD |
39 | |
40 | BUILDING | |
41 | -------- | |
42 | ||
43 | ./bootstrap (skip if using tarball) | |
44 | ./configure | |
45 | make | |
46 | make install | |
47 | ||
48 | DEPENDENCIES | |
49 | ------------ | |
50 | ||
51 | To compile Babeltrace and lttngtop, you will need: | |
52 | ||
53 | gcc 3.2 or better | |
54 | libc6 development librairies | |
55 | (Debian : libc6, libc6-dev) | |
56 | (Fedora : glibc, glibc) | |
57 | glib 2.22 or better development libraries | |
58 | (Debian : libglib2.0-0, libglib2.0-dev) | |
59 | (Fedora : glib2, glib2-devel) | |
1fc22eb4 JD |
60 | libpopt >= 1.13 development libraries |
61 | (Debian : libpopt-dev) | |
62 | (Fedora : popt) | |
63 | ncurses development libraries | |
64 | (Debian : libncurses5-dev) | |
c263c4eb | 65 | babeltrace development library |
1fc22eb4 JD |
66 | |
67 | For developers using the git tree: | |
68 | ||
69 | This source tree is based on the autotools suite from GNU to simplify | |
70 | portability. Here are some things you should have on your system in order to | |
71 | compile the git repository tree : | |
72 | ||
73 | - GNU autotools (automake >=1.10, autoconf >=2.50, autoheader >=2.50) | |
74 | (make sure your system wide "automake" points to a recent version!) | |
75 | - GNU Libtool >=2.2 | |
76 | (for more information, go to http://www.gnu.org/software/autoconf/) | |
77 | - Flex >=2.5.35. | |
78 | - Bison >=2.4. | |
79 | ||
80 | If you get the tree from the repository, you will need to use the "bootstrap" | |
81 | script in the root of the tree. It calls all the GNU tools needed to prepare the | |
82 | tree configuration. |