1. 安装
yum install -y systemtap systemtap-runtime
2. 环境准备
 
 a. 自动安装依赖
stap-prep
b. 手动安装依赖
kernel-debuginfo
kernel-debuginfo-common
kernel-devel 简单的方式使用yum install 或者 debuginfo-install
实在不行可以下载rpm手工安装,地址:
http://debuginfo.centos.org/7/x86_64/ 注意:需要选择对应操作系统kernel 版本
3. 简单测试使用
stap -ve 'probe vfs.read {printf("read test"); exit()}'
4. 测试结果
stap -ve 'probe vfs.read {printf("read test"); exit()}'
Pass 1: parsed user script and 466 library scripts using 226620virt/39692res/3312shr/36508data kb, in 310usr/10sys/329real ms.
Pass 2: analyzed script: 1 probe, 1 function, 7 embeds, 0 globals using 370760virt/179584res/4632shr/180648data kb, in 1700usr/220sys/1922real ms.
Pass 3: translated to C into "/tmp/stapgCuafC/stap_ce7abe45c93b347a24b025ea2830bd0d_2681_src.c" using 370760virt/179856res/4904shr/180648data kb, in 0usr/0sys/9real ms.
Pass 4: compiled C into "stap_ce7abe45c93b347a24b025ea2830bd0d_2681.ko" in 1700usr/550sys/3127real ms.
Pass 5: starting run.
read testPass 5: run completed in 10usr/20sys/335real ms.
5. 生成机器对应的内核模块
stap -r kernel-version  script -m module_name
参考:
stap -ve 'probe vfs.read {printf("read test"); exit()}' -m dalongdemo
会生成 dalongdmeo.ko
运行: staprun dalongdemo.ko
6. stap 运行命令参考
 
-v  可以重复多次,次数越多,显示的信息月详细
-o 将信息输出到文件
-S 指定输出文件的大小
-e 包含的script
-F 进行记录录制
-m 指定生成的内核模块的名称
7. 参考资料
http://debuginfo.centos.org/7/x86_64/
https://sourceware.org/systemtap/
 
 
 
 

systemtap 安装试用的更多相关文章

  1. 项目管理工具 Redmine 安装试用手记

    原文:项目管理工具 Redmine 安装试用手记 项目管理工具 Redmine 安装试用手记 分类: Redmine2009-06-01 10:12 996人阅读 评论(1) 收藏 举报 项目管理工具 ...

  2. RHEL6 Systemtap 安装笔记

    以 RHEL6u3 为例 1  Systemtap 安装 yum install systemtap 跟systemtap有关的有6,7个,全装上,别偷懒 就用yum安装,别傻傻的去下rpm包,吃力不 ...

  3. systemtap安装

    一.systemtap介绍 SystemTap是一个强大的调试工具,是监控和跟踪运行中的Linux 内核的操作的动态方法,确切的说应该是一门调试语言,因为它有自己的语法,也有解析.编译.运行等过程(准 ...

  4. Tencent Server Web 安装试用

    Tencent Server Web 安装试用 私有环境搭建,使用docker-compose 进行memcache 安装 参考github 代码 https://github.com/rongfen ...

  5. toxiproxy 安装试用

    备注:    实际上是一个代理工具,但是又不是简单的进行代理(tcp,可以配置策略,toxics 实现延迟,模拟故障,    对于这个大家可能了解的就是netflix 公司的chaos monkey, ...

  6. windows openssh server 安装试用

    使用Windows的可能会知道win10 的已经包好了openssh 服务,但是对于其他机器win 7 windows 2008 ,就需要其他的方法了 还好powershell 团队开发了支持wind ...

  7. SystemTap - 安装

    按照SystemTap Beginners Guide的Installation and Setup部分安装了SystemTap,没想到竟然还有点曲折,在这里纪录一下. 环境 Linux发行版本:Ce ...

  8. pgbench 安装试用

    pgbench 是一个方便的pg 性能测试工具,以下是简单的测试试用 安装 安装pg yum install https://download.postgresql.org/pub/repos/yum ...

  9. flynn 开源paas 平台安装试用

    flynn 是一个不错的开源paas 平台,基于git 以及容器技术,开发模型与 heroku 基本一样,同时构建方式就是基于heroku 的buildpacks 安装 官方文档提示说明是ubuntu ...

随机推荐

  1. mui 禁止透明背景点击关闭弹窗遮罩

    //禁止关闭遮罩 window.addEventListener('tap', function(e) { e.target.className == 'mui-backdrop mui-active ...

  2. 一款连接SqlServer的数据库工具

    由于自己使用的电脑系统是xp,而服务器上的数据库是SqlServer2012,于是用SqlServer2005管理端操作2012,总是不成功.在网上也百度谷歌了很久,也没有解决,也发了很多问没有找到解 ...

  3. VB与C#的区别(转载)

    由于工作原因要熟悉这两门编程语言.网上找的. VB.NET Program Structure C# Imports System Namespace Hello               Clas ...

  4. Gridview 尾部添加总计

    1.GridView控件showfooter的属性=true 2. int totalZJ, iZJ; protected void GridView1_RowDataBound(object sen ...

  5. L147 Low Cost Study Has High Impact Results For Premature Babies

    No one knows exactly why some babies are born prematurely(早产), but some of the smallest premature ba ...

  6. New Concept English three(19)

    27w/m 76words Kidnappers are rarely interested in Animals, but they recently took considerable inter ...

  7. 【这些年】Linux C/C++软件开发用过的工具

          这些年一直从事Linux下C/C++软件开发,学习工作中用到了不少开发工具,一直想做个总结,却总是因为这个原因那个原因,未能动笔.趁今天天气凉爽,空气清新,花点儿功夫,做一个小结啦,防止以 ...

  8. vue.js 源代码学习笔记 ----- instance state

    /* @flow */ import Dep from '../observer/dep' import Watcher from '../observer/watcher' import { set ...

  9. iOS怎么来实现关闭自动锁屏

    怎么来设置[UIApplication sharedApplication]   idleTimerDisabled 属性来控制自动锁屏的效果 // 把设置idleTimerDisabled的代码放到 ...

  10. rancher下的kubernetes之一:构建标准化vmware镜像

    学习kubernetes的时候,我们需要在kubernetes环境下实战操作,然而kubernetes环境安装并不容易,现在通过rancher可以简化安装过程,咱们来实战rancher下的kubern ...