install systemtap under centos
1 安装systemtap
yum install systemtap systemtap-runtime
yum install kernel-devel kernel-debug
##下载对应kernel的debuginfo
debuginfo-install kernel-2.6.32-504.12.2.el6
下载比较久。可以选择到其他网站上先把那个rpm下载下来
oss.oracle.com/el6/debuginfo
http://debuginfo.centos.org/6/x86_64/
2 开启debuginfo的repo
vim /etc/yum.repos.d/CentOS-Debuginfo.repo
enabled=1
3 测试
stap -v -e ‘probe vfs.read {printf("read performed\n"); exit()}‘
时间: 2024-10-11 09:28:27