-
-
Save alexandrnikitin/7fd095371e8c105f6cb9ab7f87664547 to your computer and use it in GitHub Desktop.
sudo yum install -y systemtap systemtap-runtime | |
sudo yum install kernel-debuginfo kernel-debuginfo-common | |
sudo yum install yum-utils | |
debuginfo-install kernel-3.10.0-514.21.2.el7.x86_64 | |
sudo yum install -y kernel-devel-$(uname -r) | |
sudo yum install -y kernel-debuginfo-$(uname -r) | |
sudo yum install -y kernel-debuginfo-common-$(uname -m)-$(uname -r) |
Good job
Tried to install it in CentOS 7.5, it seems systemtap-devel is requried as well.
Or
runtime_defines.h: No such file or directory
will occurred if execute
stap -ve 'probe begin { log("hello world") exit() }'
In CentOS 7.4, it seems systemtap-devel is also required
The names of the packages have changed as of 29 April 2020. This ran fine on Centos 7 build 2003
sudo yum install -y systemtap systemtap-devel systemtap-runtime
sudo yum install -y yum-utils
sudo yum install -y wget
uname -r
3.10.0-1127.el7.x86_64
browse http://debuginfo.centos.org/7/x86_64/
In the case of kernel build 1127 there are 7 packages, and debuginfo-common needs to come first
http://debuginfo.centos.org/7/x86_64/kernel-debuginfo-common-x86_64-3.10.0-1127.el7.x86_64.rpm
http://debuginfo.centos.org/7/x86_64/kernel-debug-debuginfo-3.10.0-1127.el7.x86_64.rpm
http://debuginfo.centos.org/7/x86_64/kernel-debuginfo-3.10.0-1127.el7.x86_64.rpm
http://debuginfo.centos.org/7/x86_64/kernel-plus-debuginfo-3.10.0-1127.el7.centos.plus.x86_64.rpm
http://debuginfo.centos.org/7/x86_64/kernel-plus-debuginfo-common-x86_64-3.10.0-1127.el7.centos.plus.x86_64.rpm
http://debuginfo.centos.org/7/x86_64/kernel-plus-tools-debuginfo-3.10.0-1127.el7.centos.plus.x86_64.rpm
this one conflicts with the previous one, don't know if that is good, bad, or ...
http://debuginfo.centos.org/7/x86_64/kernel-tools-debuginfo-3.10.0-1127.el7.x86_64.rpm
(a)
wget http://debuginfo.centos.org/7/x86_64/kernel-plus-debuginfo-common-x86_64-3.10.0-1127.el7.centos.plus.x86_64.rpm
sudo yum --enablerepo=base-debuginfo localinstall -y kernel-plus-debuginfo-common-x86_64-3.10.0-1127.el7.centos.plus.x86_64.rpm
(b)
sudo yum --enablerepo=base-debuginfo localinstall -y http://debuginfo.centos.org/7/x86_64/kernel-plus-debuginfo-common-x86_64-3.10.0-1127.el7.centos.plus.x86_64.rpm
(and do systemtap)
sudo stap -ve 'probe begin { log("hello world") exit() }'
this is slightly more demanding of the symbols
sudo stap -ve 'probe vfs.read {printf("read performed\n"); exit()}'
any particular quirk for cpanel hosts?
it requires --enablerepo=base-debuginfo that is disabled by default on CentOS systems.