在Red Hat Enterprise Linux 5.8上安装systemtap
来源:互联网 发布:新视野大学英语软件 编辑:程序博客网 时间:2024/05/19 16:38
在需要安装systemtap的机器上mount Red Hat Enterprise Linux 5.8的安装盘,使用yum search systemtap后发现有如图所示的rpm包。
看来我们的运气不错,systemtap已经包含在Red Hat Enterprise Linux 5.8的安装盘中了。不过里面的systemtap的版本是1.6的,目前最新(2013-02-18)的版本为2.1。
使用yum install systemtap安装systemtap,安装完成后,根据官方的文档使用命令stap -ve 'probe begin { log("hello world") exit () }'进行测试,systemtap执行正确,输出的结果如图所示。
但使用另外一个命令stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}'进行测试时却出现错误的提示,提示的大意是说需要安装内核的
debug-info(请注意这里的debug-info指的不是debug版的内核),按照SystemTap_Beginners_Guide中的指示,使用uname -r获得了内核的准确版本信息,如图所示。
根据得到的内核版本信息,我在ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/i386/Debuginfo/kernel-debuginfo-2.6.18-308.el5.i686.rpm以及ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/i386/Debuginfo/kernel-debuginfo-common-2.6.18-308.el5.i686.rpm下载了内核的调试信息。使用rpm -i安装上述rpm包后,再次测试stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}'
命令,这次systemtap执行正确,输出的结果如图4所示。这说明systemtap已经安装成功了。如果用户想使用systemtap对用户程序进行probe的话,根据systemTap_Beginners_Guide中的描述,还需要在系统中安装utrace。由于我暂时还没有这样的使用需求,所以就没有进行这方面相关的测试。
在写本文时才发现,其实Red Hat Enterprise Linux 5.8的安装盘中就有内核的debug-info,大家可以试一下安装盘中的debug-info是否有效果。
systemtap tutorial以及systemTap_Beginners_Guide里面的内容对于systemtap入门非常有帮助。希望有兴趣的朋友可以花时间进行一些了解。大家还可以安装systemtap-testsuite,这个安装包里面有很多实用的脚本,大家可以通过这些脚本更加深入的对systemtap进行学习。
- 在Red Hat Enterprise Linux 5.8上安装systemtap
- Red Hat Enterprise Linux 7 SystemTap Tapset Reference
- Red Hat Enterprise Linux5 在VMware 上 安装VMware tools
- Red Hat Enterprise Linux 5.1上安装JDK
- Oracle 9i 在 Red Hat Enterprise Linux 3 AS U2 上的安装
- Oracle9.2.0.6在Red Hat Enterprise Linux AS4上安装方法
- 在 Red Hat Enterprise Linux AS V3.0 上安装 Oracle 10g 数据库
- 在VMware Server和Red Hat Enterprise Linux 5上安装VMware Tools
- 在red hat enterprise linux 5 上安装配置JDK6.0
- 在VMware Server和Red Hat Enterprise Linux 5上安装VMware Tools
- 在Red Hat Enterprise Linux 5.4上安装中文字体和中文输入法
- 怎样在Red Hat Enterprise Linux 5.4版本上安装GCC?
- 在虚拟机上安装Red Hat Enterprise Linux 5的教程
- 在CentOS 5 或Red Hat Enterprise Linux安装语言包
- 在vm7下安装red hat enterprise linux 5
- 在CentOS 5 或Red Hat Enterprise Linux安装语言包
- 在Red Hat Enterprise Linux 5.3安装RRDTool
- 在Red Hat Enterprise Linux 5.3安装NTOP
- 2012年年度总结
- Apache二级域名配置
- hql tips
- Java的Generics和c++的Template到底有什么不同?
- Java汉字转换为拼音
- 在Red Hat Enterprise Linux 5.8上安装systemtap
- 2013过年回家收获
- Java Thread
- C++之函数指针
- Java规则引擎工作原理及其应用(转)
- 关于java中边界值校验的问题
- java-synchronized修饰方法释疑
- How to install and use GCC g++ v4.7 and C++11 on Ubuntu 12.04
- java bingfa