Installing systemtap on CentOS 7

I recently had the need to install systemtap on one of my CentOS 7 VMs and the process isn’t as straight forward as it should be. It seems not all packages needed are built for all revisions of the kernel. After much searching, I managed to get this working and wanted to archive this procedure.

In order to get this running (safely), we need compatible version numbers for the kernel, kernel-devel, and kernel-debuginfo packages. Let’s first get a list of availaible versions for these packages:

# yum --enablerepo=*-debuginfo --showduplicates list kernel kernel-devel kernel-debuginfo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.beyondhosting.net
 * extras: repos.mia.quadranet.com
 * updates: centos.mirrors.tds.net
Installed Packages
kernel.x86_64 3.10.0-123.el7 @anaconda
kernel.x86_64 3.10.0-229.4.2.el7 @updates
Available Packages
kernel.x86_64 3.10.0-229.el7 base
kernel.x86_64 3.10.0-229.1.2.el7 updates
kernel.x86_64 3.10.0-229.4.2.el7 updates
kernel-debuginfo.x86_64 3.10.0-123.el7 base-debuginfo
kernel-debuginfo.x86_64 3.10.0-123.1.2.el7 base-debuginfo
kernel-debuginfo.x86_64 3.10.0-123.4.2.el7 base-debuginfo
kernel-debuginfo.x86_64 3.10.0-123.4.4.el7 base-debuginfo
kernel-debuginfo.x86_64 3.10.0-123.6.3.el7 base-debuginfo
kernel-debuginfo.x86_64 3.10.0-123.8.1.el7 base-debuginfo
kernel-debuginfo.x86_64 3.10.0-123.9.2.el7 base-debuginfo
kernel-debuginfo.x86_64 3.10.0-123.9.3.el7 base-debuginfo
kernel-debuginfo.x86_64 3.10.0-123.13.1.el7 base-debuginfo
kernel-debuginfo.x86_64 3.10.0-123.13.2.el7 base-debuginfo
kernel-debuginfo.x86_64 3.10.0-123.20.1.el7 base-debuginfo
kernel-debuginfo.x86_64 3.10.0-229.el7 base-debuginfo
kernel-debuginfo.x86_64 3.10.0-229.1.2.el7 base-debuginfo
kernel-devel.x86_64 3.10.0-229.el7 base
kernel-devel.x86_64 3.10.0-229.1.2.el7 updates
kernel-devel.x86_64 3.10.0-229.4.2.el7 updates

The latest version of the kernel-debuginfo package is 3.10.0-229.1.2.el7 and is common among the required packages so we’ll install this version:

# yum --enablerepo=*-debuginfo install kernel-3.10.0-229.1.2.el7 kernel-debuginfo-3.10.0-229.1.2.el7 kernel-devel-3.10.0-229.1.2.el7 systemtap

Once this completes, reboot and ensure you select the matching kernel version.

Sit back and enjoy running systemtap.

 

Posted in linux, Technology, Virtualization

Leave a Reply

Your email address will not be published. Required fields are marked *

*