SystemTap installation under Centos7

SystemTap installation under Centos7

Because you need to install the development package and debug package corresponding to the current kernel version

Check the kernel version first

# uname -r

# 3.10.0-327.el7.x86_64 (the kernel version of my own virtual machine)

Need to download the rpm package, download address:  http://debuginfo.centos.org

sudo yum install systemtap systemtap-runtime

Find your corresponding rpm package and download
wget http://debuginfo.centos.org/7/x86_64/kernel-debug-debuginfo-3.10.0-327.el7.x86_64.rpm
wget http://debuginfo.centos.org/ 7/x86_64/kernel-debuginfo-common-x86_64-3.10.0-327.el7.x86_64.rpm

After downloading, install it directly with the rpm command:

sudo rpm -ivh kernel-debuginfo-common-x86_64-3.10.0-327.el7.x86_64.rpm
sudo rpm -ivh kernel-debug-debuginfo-3.10.0-327.el7.x86_64.rpm

Test whether stap can run normally
stap -e'probe begin{printf("Hello, World"); exit();}'

Guess you like

Origin blog.csdn.net/qq_40210804/article/details/109286133