systemtap: a linux trace/probe tool Visit the project web site at , for documentation and mailing lists for developers and users. This is free software. See the COPYING file for redistribution/modification terms. See the INSTALL file for generic build instructions. Prerequisites: - linux kernel with kprobes (mainline 2.6.11+ or backport) - kernel module build environment (kernel-devel or kernel-smp-devel rpm) - kernel debugging information (kernel-debuginfo rpm) - C compiler (same as what kernel was compiled with) - elfutils with libdwfl for debugging informatin parsing - root privileges Installation steps: - Install the kernel-debuginfo, kernel-devel, gcc packages. - Install the systemtap package, if one already exists. Build steps: - Install the kernel-debuginfo, kernel-[smp-]devel, gcc and libcap-devel packages (or see below if you are building your own kernels from source). If avaialable, install your distribution's copy of elfutils and its development headers/libraries. - Or if desired, download an elfutils source release to build in "bundled mode" (below), and untar it into some new directory. Or if desired, build elfutils separately one time, and install it to /usr/local. See http://fedorahosted.org/elfutils/ - Download systemtap sources: http://sources.redhat.com/systemtap/ftp/releases/ http://sources.redhat.com/systemtap/ftp/snapshots/ (or) git clone git://sources.redhat.com/git/systemtap.git (or) http://sources.redhat.com/git/systemtap.git - Build systemtap normally: % .../configure [other autoconf options] Or, with build it with a bundled internal copy of elfutils: % .../configure --with-elfutils=ELFUTILS-SOURCE-DIR [other autoconf options] Consider configuring with "--enable-dejazilla" to automatically contribute to our public test result database. % make all check % sudo make install % sudo make installcheck Tips: - Systemtap looks for the debug info in these locations: /boot/vmlinux-`uname -r` /usr/lib/debug/lib/modules/`uname -r`/vmlinux /lib/modules/`uname -r`/vmlinux /lib/modules/`uname -r`/build/vmlinux Building a kernel.org kernel: - Build the kernel using your normal procedures. Enable CONFIG_DEBUG_INFO, CONFIG_KPROBES, and optionally CONFIG_RELAY and CONFIG_DEBUG_FS. - Boot into the kernel. - Make sure the large unstripped kernel image 'vmlinux' from your build can be found by systemtap (see above) You can just symlink it to one of these locations. - Symlink your source directory to these two places, though systemtap does not at present use such source code. - /usr/src/kernels/`uname -r` - /lib/modules/`uname -r`/source - Symlink your build directory to here: - /lib/modules/`uname -r`/build - For example, if your kernel source is in /home/me/linux/2.6.17-rc6 and you build your kernel in the source directory, you would do this (be sure you are running the right kernel or `uname -r` will be wrong:) ln -s /home/me/linux/2.6.17-rc6/vmlinux /boot/vmlinux-`uname -r` mkdir /usr/src/kernels (if needed) ln -s /home/me/linux/2.6.17-rc6 /usr/src/kernels/`uname -r` mkdir /lib/modules/`uname -r` (if needed) ln -s /home/me/linux/2.6.17-rc6 /lib/modules/`uname -r`/build ln -s /home/me/linux/2.6.17-rc6 /lib/modules/`uname -r`/source