ubuntu 11.04下安装systemtap
来源:互联网 发布:centos下php环境搭建 编辑:程序博客网 时间:2024/04/30 15:31
1.首先安装systemtap:
sudo apt-get install systemtap
2.安装linux kernel的debug info
可以到http://ddebs.ubuntu.com/pool/main/l/linux/下载与kernel版本一致的debug info包,可以参照http://blog.csdn.net/ustc_dylan/article/details/7079876来进行。
我这里用另外一种方法,就是重新编译kernel。过程如下:
(1)apt-get install linux-source-2.6.38 下载内核源码
(2)进入源码目录:
cd /usr/src/
解压源码包:
bzip2 -d linux-source-2.6.38.tar.bz2
tar xvf linux-source-2.6.38.tar
(3)进入源码目录,执行make menuconfig
/usr/src/linux-source-2.6.38/linux-source-2.6.38# make menuconfig
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
这是由于libncurses5-dev包没有安装,执行以下命令:
apt-get install libncurses5-dev
再尝试make menuconfig,将以下编译选项选中(默认都是选中的)
Kernel hacking
Kernel debugging
Compile the kernel with debug info
General setup
Kprobes
执行make;make modules_install;make install
执行cp vmlinux /lib/modules/2.6.38/2.6.38-prep (从一个教程上看来的,但是觉得没有必要这么做)
重启系统。
(4)安装elfutils
sudo apt-get install elfutils
(5)执行以下命令,有正确的返回值说明systemtap安装成功
#stap -ve ’probe begin { log("hello world") exit () }’
#stap -c df -e ’probe syscall.open { if (target()==pid()) log(name." ".argstr) }’
参考:
http://blog.chinaunix.net/space.php?uid=20589995&do=blog&id=1621748
http://linux.chinaunix.net/docs/2006-12-15/3479.shtml
- ubuntu 11.04下安装systemtap
- ubuntu 11.10 安装systemtap
- ubuntu 11.10 安装systemtap
- ubuntu 11.10 安装systemtap
- ubuntu 13.10安装systemtap
- ubuntu安装systemtap
- UBUNTU 10.04安装SYSTEMTAP
- Ubuntu上systemtap安装
- 【SystemTap】 Linux下安装使用SystemTap源码安装SystemTap
- systemtap 在Ubuntu上安装
- Fedora下的SystemTap安装
- Centos 6.4下SystemTap安装
- 【Systemtap】Cent OS 5.4 final下Systemtap的安装
- 在Ubuntu上安装使用Systemtap
- fedora 10 下安装systemtap详解
- systemtap安装
- SYSTEMTAP安装
- systemtap安装
- 开源网站收集
- js 中文转码后台java解码
- 总结出两种增减用户的方式
- 指针浅谈
- RGB565 to RGB24, RGB555 & RGB2
- ubuntu 11.04下安装systemtap
- Hibernate 优缺点
- assert()函数用法总结
- 真实案例解析OO理论与实践
- currentFrame / totalFrames / framesLoaded
- 养成一个SQL好习惯带来一笔大财富
- QT的一些问题
- V4L2 编程
- jsp字符乱码的处理