SystemTap provides free software (GPL) infrastructure to simplify the gathering of information about the running Linux system.
Simply install .or AUR, all done. Compare it to the most recent upstream release at
Consider also building it from sources at , where support for newer kernels or distros makes first appearance.
You will need at least thepackage installed.
Because Arch permanently strips debugging data from its distributed binaries (including the kernel), many normal/fancier systemtap capabilities are simply not available, so many examples at /usr/share/doc/systemtap/examples will not work. However, see the stapprobes man page for the NON-DWARF and AUTO-DWARF probe types for what should still work, for example:
- kernel tracepoints: kernel.trace("*")
- user-space probes: process("...").function("...") (for programs you build yourself with -g)
- user-space markers: process("...").mark("...") (if they were configured with the <sys/sdt.h> markers)
- perfctr-based probes: perf.*
- non-dwarf kernel probes: kprobe.function("...") and nd_syscall.* tapset (if a /boot/System.map* file is available, see below).
You may consider to build a linux-custom package to run SystemTap, but rebuilding the original Kernels/Traditional compilation.package is easy and efficient. See also
cd ~/ && mkdir build && cd build/ && ASPROOT=. asp checkout linux && cd linux/trunk to get the original kernel build files.
makepkg --verifysource to get the additional files. By performing the verification, you can safely skip the steps on "Update checksum".
Edit config (for 32-bit systems) or config.x86_64 (for 64-bit systems), turn on these options:
By default only CONFIG_DEBUG_INFO and CONFIG_DEBUG_INFO_REDUCED are not set.
With current core/linux (tested with 3.15.2) you can simply append these lines into config.[x86_64]:
echo ' CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_REDUCED=n ' >> config.x86_64
Note that if you want to put these lines into a self-maintained script, do not insert any space before CONFIG_* lines.
You can safely skip this step if you believe the source files are correct.
sha256sum config[.x86_64] to get a new sha256sum.
In PKGBUILD file, the
sha256sum=('sum-of-first' ... 'sum-of-last') has the same order with
source=('first-source' ... 'last-source'), put your new sha256sum in the right place.
Build and Install
Optional: It is recommended to set
/etc/makepkg.conf to speed up the compilation.
You will need about 12 GB disk space for this build. Consider using an in-memory tmpfs if you have large DRAM.
makepkg --skipchecksums to compile, then simply
sudo pacman -U *.pkg.tar.gz to install the packages.
pacman will tell you reinstall, and you should say y.
and should be reinstalled, does not matter.
Via this method, external modules (e.g.and ) do not need to be rebuilt.
Build custom kernel
Please reference this README
Pass 4 fails when launching
If you have:
/usr/share/systemtap/runtime/stat.c:214:2: error: 'cpu_possible_map' undeclared (first use in this function)
Try to install systemtap-git package
System.map is missing
You can recover it where you build your linux kernel with DEBUG_INFO enabled
cp src/linux-3.6/System.map /boot/System.map-3.6.7-1-ARCH
sudo cp /proc/kallsyms /boot/System.map-`uname -r`
Process return probes not available
If you are sure that your kernel configuration is correct, but on launching
stap you get both of the following messages:
WARNING: Kernel function symbol table missing [man warning::symbols]
semantic error: process return probes not available [man error::inode-uprobes]
then SystemTap may have failed to verify support for this feature. You can fix this by following the steps in System.map is missing.