http://hi.baidu.com/yingnet/blog/item/b2831bd703d363d7a044dfd3.html

 

CentOS上SystemTap安装

2009-12-09 18:54

Solaris有DTrace这样的探针工具,而SystemTap就是Linux下的类似工具。SystemTap是用于深度检测运行中的linux的工具。今天在Centos5.4上安装成功,过程比较曲折,因此记录一下。

tcsh code : 官方推荐的安装命令

yum install systemtap kernel-devel yum-utils
debuginfo-install kernel

由于我的Centos yum repository上没有kernel-debuginfo包,于是得手工添加有这个包的repository。当然也可以把这个包及依赖包rpm文件下载到本地安装。
在/etc/yum.repos.d新建一个文件,我把他命令为debuginfo
然后在debuginfo中加入

[debuginfo]
name=CentOS-$releasever - debuginfo
baseurl=http://debuginfo.centos.org/5/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

然后在执行官方推荐的安装命令的命令就可以了。整个过程要下载300多M文件,因此需要很长的时间。
安装完后通过执行sudo stap -ve 'probe begin { log("hello world") exit() }'如果输出中包含hello world就说明安装成功了。

tongji.gif本文来自hi.baidu.com/yingnet,版权所有,转载请注明出处,谢谢合作