安装systemtap

### Setting up Operating Systems

Originally we used Virtual Machines for Oracle VirtualBox with Solaris 11.0 and CentOS 6.4. Unfortunately, these versions become stale, while VirtualBox is a second-level hypervisor which complicates performance analysis experiments.

Actual version of this book was modified to support Solaris 11.2 and CentOS 7.0. They were installed in a Xen 4.4 environment in HVM machines. I assume that you were installed these operating systems and already performed basic setup like setting IP address or root password.

#### Setting up CentOS 7

* You will need debuginfo packages to access debug information. They are located in separate CentOS repository which you will need to turn on:

# sed -i ‘s/^enabled=0/enabled=1/g‘ /etc/yum.repos.d/CentOS-Debuginfo.repo

!!! WARN CentOS 7.0 contains incorrect GPG key for debuginfo repository like described in [bug 7516](https://bugs.centos.org/view.php?id=7516), so you will also need to update `centos-release` package:

# yum install centos-release

!!!

* Install SystemTap

# yum install systemtap systemtap-sdt-devel systemtap-client

* Run `stap-prep` script. That script will install packages that are needed for building kernel modules and debuginfo packages:

# stap-prep

!!! NOTE `kernel-debuginfo` may be installed manually using YUM package manager. In that case, however, you should add precise version of kernel to a package name. Otherwise YUM will install newest version that probably wouldn‘t match kernel you running. !!!

* Install `debuginfo-install` utility:

# yum install yum-utils

* Install debug information for userspace programs:

# debuginfo-install cat python

* Change `/tmp` mount point to tmpfs. To do that, add following line to `/etc/fstab` file:

tmpfs        /tmp       tmpfs     defaults          0 0

After that clean up /tmp and run `mount -a` command.  * Building TSLoad workload generator and its modules    * Install SCons

# yum install wget # cd /tmp # wget ‘http://prdownloads.sourceforge.net/scons/scons-2.3.4-1.noarch.rpm‘ # rpm -i scons-2.3.4-1.noarch.rpm

* Install development files:

# yum install libuuid-devel libcurl-devel

* Build a workload generator:

# git clone https://github.com/myaut/tsload # cd tsload/agent # scons --prefix=/opt/tsload install

* Build loadable modules:

# git clone https://bitbucket.org/sergey_klyaus/dtrace-stap-book.git # cd dtrace-stap-book/tsload # scons --with-tsload=/opt/tsload/share/tsload/devel install

*  Install OpenJDK7:

# yum install java-1.7.0-openjdk-devel.x86_64

#### Setting up Solaris 11.2

* Building TSLoad workload generator and its modules    * Install SCons

# wget ‘http://prdownloads.sourceforge.net/scons/scons-2.3.4.tar.gz‘ # tar xzvf scons-2.3.4.tar.gz # cd scons-2.3.4/ # python setup.py install

* Install development files:

# pkg install pkg:/developer/gcc-45 # pkg install pkg:/developer/build/onbld

* Build a workload generator:

# git clone https://github.com/myaut/tsload # cd tsload/agent # scons --prefix=/opt/tsload install

* Build loadable modules:

# git clone https://bitbucket.org/sergey_klyaus/dtrace-stap-book.git # cd dtrace-stap-book/tsload # scons --with-tsload=/opt/tsload/share/tsload/devel install

* Install JDK7:

# pkg install --accept pkg:/developer/java/jdk-7

时间: 2024-12-16 19:09:36

安装systemtap的相关文章

CentOS 5.4 final下Systemtap的安装

CentOS 5.4 final下Systemtap的安装 时间:2015-02-11来源:linux网站 作者:zklth 一.Systemtap运行环境需求   (1)linux kernel with kprobes (mainline 2.6.11+ or backport):   (2)kernel module build environment (kernel-devel or kernel-smp-devel rpm):   (3)kernel debugging informa

在Ubuntu上安装使用Systemtap

因为最近开始学习Nginx,在网上看到别人介绍了一款强大的内核探测工具Systemtap,于是便准备学习下这款探测工具为以后代码分析做准备. 第一步便是安装.在自己电脑上安装的时候,也是费了一番劲儿.因此,为防止以后需要重新安装,也希望可以帮助后来学习的人,在这里准备写一篇博客做一个记录. 以下便是安装步骤: (0).安装elfutils,提供分析调试信息的库函数,及libcap-dev. 借助于Ubuntu方便强大的包管理器,可以很方便进行安装,如下: sudo apt-get install

SystemTap 学习笔记 - 安装篇

https://segmentfault.com/a/1190000000671438 在安装前,需要知道下自己的系统环境,我的环境如下: uname -r 2.6.18-308.el5 Linux 2.6.18-308.el5 #1 SMP Tue Feb 21 20:06:06 EST 2012 x86_64 x86_64 x86_64 GNU/Linux 安装 为了部署 SystemTap,需要安装以下两个 RPM 包: systemtap systemtap-runtime 以 root

SYSTEMTAP安装

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 ht

【技术干货】听阿里云CDN安防技术专家金九讲SystemTap使用技巧

1.简介 SystemTap是一个Linux非常有用的调试(跟踪/探测)工具,常用于Linux 内核或者应用程序的信息采集,比如:获取一个函数里面运行时的变 量.调用堆栈,甚至可以直接修改变量的值,对诊断性能或功能问题非 常有帮助.SystemTap提供非常简单的命令行接口和很简洁的脚本语 言,以及非常丰富的tapset和例子. 2.何时使用 定位(内核)函数位置 查看函数被调用时的调用堆栈.局部变量.参数 查看函数指针变量实际指的是哪个函数 查看代码的执行轨迹(哪些行被执行了) 查看内核或者进

Linux下性能测量和调试诊断工具Systemtap

一.简介 SystemTap是一个诊断Linux系统性能或功能问题的开源软件.它使得对运行时的Linux系统进行诊断调式变得更容易.更简单.有了它,开发者或调试人员不再需要重编译.安装新内核.重启动等烦人的步骤. 为了诊断系统问题或性能,开发者或调试人员只需要写一些脚本,然后通过SystemTap提供的命令行接口就可以对正在运行的内核进行诊断调试,以前需要的修改或插入调试代码.重新编译内核.安装内核和重启动等这些琐碎的工作完全消除.目前该工具并不支持对用户态应用的诊断调试,但是它们在以后会被添加

PostgreSQL SystemTap on Linux

http://digoal126.wap.blog.163.com/w2/blogDetail.do;jsessionid=3949B03DE151DA0E55D807466C5E630B.yqblog35-8010?blogId=fks_087064087086083071087082094069072087087064092081081067080086&showRest=true&p=2&[email protected] 德哥@Digoal 2013-08-14 15:57

内核调试神器SystemTap — 简介与使用(一)

a linux trace/probe tool. 官网:https://sourceware.org/systemtap/ 简介 SystemTap是我目前所知的最强大的内核调试工具,有些家伙甚至说它无所不能:) (1) 发展历程 Debuted in 2005 in Red Hat Enterprise Linux 4 Update 2 as a technology preview. After four years in development, System 1.0 was relea

ubuntu+systemtap进行Linux内核和用户空间开发测试

ubuntu+systemtap进行Linux内核和用户空间开发测试 Sailor_forever  sailing_9806#163.com (本原创文章发表于Sailor_forever 的个人blog,未经本人许可,不得用于商业用途.任何个人.媒体.其他网站不得私自抄袭:网络媒体转载请注明出处,增加原文链接,否则属于侵权行为.如有任何问题,请留言或者发邮件给sailing_9806#163.com) [摘要]本文主要介绍在ubuntu平台 + 自定义内核上如何安装systemtap工具包及