]> sourceware.org Git - systemtap.git/blame - README
Initialize variable to avoid compiler error.
[systemtap.git] / README
CommitLineData
0d49d7bc
FCE
1systemtap: a linux trace/probe tool
2
3Visit the project web site at <http://sources.redhat.com/systemtap>,
4for documentation and mailing lists for developers and users.
5
6This is free software.
7See the COPYING file for redistribution/modification terms.
8See the INSTALL file for generic build instructions.
9
10Prerequisites:
11
9e0abebd 12- linux kernel with kprobes (mainline 2.6.11+ or backport)
d90adf0d 13- kernel module build environment (kernel-devel rpm)
27cffb52
FCE
14- kernel debugging information (kernel-debuginfo rpm)
15- C compiler (same as what kernel was compiled with)
d90adf0d 16- elfutils with libdwfl for debugging information parsing
0d49d7bc
FCE
17- root privileges
18
062f1f1f
FCE
19Installation steps:
20
50958227
FCE
21- Install the kernel development and gcc packages.
22- Install any debuginfo packages you need, for kernel and/or userspace.
23 (Beware of confusion between kernel vs. kernel-debug vs kernel-PAE etc.
24 variants. Each likely has a corresponding development and debuginfo
25 package.)
062f1f1f
FCE
26- Install the systemtap package, if one already exists.
27
28Build steps:
29
7115de82 30- Install the kernel-debuginfo, kernel-devel, gcc and dependent
530dc83b 31 packages (or see below if you are building your own kernels from source).
ab45bf5d 32
7115de82
FCE
33- If available, install your distribution's copy of elfutils and its
34 development headers/libraries.
35 Or if desired, download an elfutils source release to build in
113187f4
FCE
36 "bundled mode" (below), and untar it into some new directory.
37 Or if desired, build elfutils separately one time, and install
38 it to /usr/local.
39 See http://fedorahosted.org/elfutils/
ab45bf5d 40
89d60409
FCE
41- On modern Fedora, install general optional build-requisites:
42 # yum-builddep systemtap
43 On modern Debian/Ubuntu, similarly:
44 # apt-get build-dep systemtap
45
ab45bf5d
FCE
46- Download systemtap sources:
47 http://sources.redhat.com/systemtap/ftp/releases/
48 http://sources.redhat.com/systemtap/ftp/snapshots/
062f1f1f 49 (or)
02c58b37
FCE
50 git clone git://sources.redhat.com/git/systemtap.git
51 (or) http://sources.redhat.com/git/systemtap.git
ab45bf5d 52
113187f4
FCE
53- Build systemtap normally:
54 % .../configure [other autoconf options]
55 Or, with build it with a bundled internal copy of elfutils:
56 % .../configure --with-elfutils=ELFUTILS-SOURCE-DIR [other autoconf options]
7115de82 57
113187f4
FCE
58 Consider configuring with "--enable-dejazilla" to automatically
59 contribute to our public test result database.
60
7115de82
FCE
61 Consider configuring with "--prefix=DIRECTORY" to specify an
62 installation directory other than /usr/local. It can be an ordinary
63 personal directory.
64
034a1d8b 65 % make all
113187f4 66 % sudo make install
034a1d8b 67
7115de82
FCE
68 To uninstall systemtap:
69 % sudo make uninstall
70
71- Run systemtap:
72
b586f21f
FCE
73 To run systemtap after installation, add $prefix/bin to your $PATH, or
74 refer to $prefix/bin/stap directly. If you keep your build tree
75 around, you can also use the "stap" binary there.
76
77 Some samples should be available under $prefix/share/doc/systemtap/examples.
7115de82 78
d90adf0d
FCE
79 Normally, run "stap" as root. If desired, create "stapdev" and
80 "stapusr" entries in /etc/groups. Any users in "stapdev" will be
81 able to run systemtap as if with root privileges. Users in "stapusr"
82 can only launch (with "staprun") pre-compiled probe modules (created
83 by "stap -p4 ...") that a system administrator copied under
84 /lib/modules/`uname -r`/systemtap.
85
86 To run the full test suite from the build tree.
87 % sudo make installcheck
7115de82
FCE
88
89
203a3d5b 90Tips:
062f1f1f 91
034a1d8b 92- By default, systemtap looks for the debug info in these locations:
e5ec4b02
HN
93 /boot/vmlinux-`uname -r`
94 /usr/lib/debug/lib/modules/`uname -r`/vmlinux
95 /lib/modules/`uname -r`/vmlinux
113187f4 96 /lib/modules/`uname -r`/build/vmlinux
203a3d5b 97
b5e66ada 98
203a3d5b
FCE
99Building a kernel.org kernel:
100
02f582ce
FCE
101- Consider applying the utrace patches, if you wish to probe
102 user-space applications. http://people.redhat.com/roland/utrace/
103
203a3d5b 104- Build the kernel using your normal procedures. Enable
5cf57358 105 CONFIG_DEBUG_INFO, CONFIG_KPROBES, CONFIG_RELAY, CONFIG_DEBUG_FS,
02f582ce 106 CONFIG_MODULES, CONFIG_MODULES_UNLOAD, CONFIG_UTRACE if able
b5e66ada 107- % make modules_install install headers_install
203a3d5b 108- Boot into the kernel.
b5e66ada
FCE
109
110- If you wish to leave the kernel build tree in place, simply run
111 % stap -r /path/to/kernel/build/tree [...]
112 You're done.
113
114- Or else, if you wish to install the kernel build/debuginfo data into
115 a place where systemtap will find it without the "-r" option:
116 % ln -s /path/to/kernel/build/tree /lib/modules/RELEASE/build
755cdd9b
KS
117
118- Instead of using the "-r" option, you can also use the environment
119 variable SYSTEMTAP_RELEASE to direct systemtap to the kernel data.
120
This page took 0.073544 seconds and 5 git commands to generate.