SystemTap

什么是system Tap ?

SystemTap 提供环境用来获得更多关于内核几乎所有组件的信息,用以被进一步分析。SystemTap也可以被当作一种工具,为用户研究和监控内核详情提供便利。

运行system tap需要些什么 ?

- 需要如下组件包 :

  • kernel-debuginfo

  • kernel-debuginfo-common

  • kernel-devel

  • systemtap-runtime

  • gcc

如何运行 SystemTap ?

SystemTap脚本通过stap命令运行。stap 可以从标准输入或文件运行 SystemTap。

要运行systemstap,用户需要root权限。要让没有root访问权限的用户运行 SystemTap,需要把他们添加到如下的用户组之一 : "stapdev" , "stapusr"

SystemTap 如何工作 ?

它以如下方式工作:

  1. 首先,SystemTap检查已有公用tapset库对应的脚本。 然后,SystemTap将添加所有本地tapsets.

  1. SystemTap将把脚本翻译成C,再通过系统的C编译器来生成内核模块。

  2. SystemTap 加载该模块,并使能脚本中所有的probes(包括events 和 handlers) 。

  3. 当这些 events 发生时,对应的 handlers被执行。

  4. 一旦 systemTap 会话终止,probes被关闭 ,同时该内核模块被卸载。

总的来讲,当我们运行systemtap时, systemtap 通过脚本构建一个内核模块,并将其加载到内核,之后,内核允许它直接从内核抽取数据。

获取更多信息请参考 : http://sourceware.org/systemtap/langref/SystemTap_overview.html

SystemTap

What is system Tap ?

SystemTap provides environment to get more information on almost any component within the kernel so that it may be further analysed. OR SystemTap is tool which provides facility to user to study and monitor the activities of the kernel in detail.

What we need to run system tap ?

- Need below group of packages to run system tap in system :

  • kernel-debuginfo

  • kernel-debuginfo-common

  • kernel-devel

  • systemtap-runtime

  • gcc

How to run SystemTap ?

SystemTap scripts are run through the command stap. stap can run SystemTap scripts from standard input or from file.

To run systemstap user need root privileges, not all users can run systemstap. To allow secondary users to run SystemTap without root access need to add them toone of these user groups : "stapdev" , "stapusr"

How SystemTap works ?

It runs in following fashion :

  1. First, SystemTap checks the script against the existing tapset library for any tapsets used. SystemTap will then add any located tapsets with their corresponding definitions in the tapset library.

  1. SystemTap then translates the script to C, running the system C compiler to create a kernel module from it.

  2. SystemTap loads the module, then enables all the probes(events and handlers) in the script.

  3. As the events occur, their corresponding handlers are executed.

  4. Once the systemTap session is terminated, the probes are disabled, and the kernel module is unloaded.

In short, When we run systemtap, systemtap builds a kernel module out of that script and then loads the module into the kernel. Once this done kerenl allow it to extract specified data directly from kernel.

To get more information on system tap refer below link : http://sourceware.org/systemtap/langref/SystemTap_overview.html

https://kernelnewbies.org/SystemTap

[译] SystemTap的更多相关文章

  1. RxJS + Redux + React = Amazing!(译一)

    今天,我将Youtube上的<RxJS + Redux + React = Amazing!>翻译(+机译)了下来,以供国内的同学学习,英文听力好的同学可以直接看原版视频: https:/ ...

  2. Entity Framework 6 Recipes 2nd Edition 译 -> 目录 -持续更新

    因为看了<Entity Framework 6 Recipes 2nd Edition>这本书前面8章的翻译,感谢china_fucan. 从第九章开始,我是边看边译的,没有通读,加之英语 ...

  3. RxJS + Redux + React = Amazing!(译二)

    今天,我将Youtube上的<RxJS + Redux + React = Amazing!>的后半部分翻译(+机译)了下来,以供国内的同学学习,英文听力好的同学可以直接看原版视频: ht ...

  4. [systemtap手记]debian体系安装过程

    Debian体系,本人测试用机 Ubuntu 11.10 uname -r 查看原本的内核版本为 3.0.0-12-generic 第一步: 安装systemtap包 $ sudo apt-get i ...

  5. 「译」JUnit 5 系列:条件测试

    原文地址:http://blog.codefx.org/libraries/junit-5-conditions/ 原文日期:08, May, 2016 译文首发:Linesh 的博客:「译」JUni ...

  6. CSharpGL(31)[译]OpenGL渲染管道那些事

    CSharpGL(31)[译]OpenGL渲染管道那些事 +BIT祝威+悄悄在此留下版了个权的信息说: 开始 自认为对OpenGL的掌握到了一个小瓶颈,现在回头细细地捋一遍OpenGL渲染管道应当是一 ...

  7. [译]基于GPU的体渲染高级技术之raycasting算法

    [译]基于GPU的体渲染高级技术之raycasting算法 PS:我决定翻译一下<Advanced Illumination Techniques for GPU-Based Volume Ra ...

  8. Entity Framework 6 Recipes 2nd Edition(9-4)译->Web API 的客户端实现修改跟踪

    9-4. Web API 的客户端实现修改跟踪 问题 我们想通过客户端更新实体类,调用基于REST的Web API 服务实现把一个对象图的插入.删除和修改等数据库操作.此外, 我们想通过EF6的Cod ...

  9. Entity Framework 6 Recipes 2nd Edition(10-1)译->非Code Frist方式返回一个实体集合

    存储过程 存储过程一直存在于任何一种关系型数据库中,如微软的SQL Server.存储过程是包含在数据库中的一些代码,通常为数据执行一些操作,它能为数据密集型计算提高性能,也能执行一些为业务逻辑. 当 ...

随机推荐

  1. 【简单dp】poj 2127 Greatest Common Increasing Subsequence【最长公共上升子序列】【模板】

    Sample Input 5 1 4 2 5 -12 4 -12 1 2 4 Sample Output 2 1 4 题目:给你两个数字序列,求出这两个序列的最长公共上升子序列.输出最长的长度,并打表 ...

  2. 初识Spring security-添加security

    请先查看 初识Spring security-无Security的SpringMVC 在pom.xml文件中添加包 <!-- Spring Security --> <depende ...

  3. sem总结

    从实况搜索这些关键词 有没有排名,有排名 不用管,没有的话 就一点点网上加价格 ,加到有为止 一个单元关键字控制30以内差不多 如果关键词词量有限 ,病种相差不大 可以不用屏蔽 投产=销量/消费订购率 ...

  4. netty上手

    关于netty的基础NIO,请参见:NIO原理及实例 下面介绍Netty的上手使用: 首先为项目添加jar依赖: <dependency> <groupId>io.netty& ...

  5. ZooKeeper服务-一致性、实现

    实现 ZooKeeper服务有两种不同的运行模式.一种是“独立模式”(standalone mode),即只有一个ZooKeeper服务器.这种模式比较简单,适合于测试环境,但是不能保证高可用性和可恢 ...

  6. MAC 系列 之XCode7.1 + HBuilder MUI 离线打包 ipa 上次application leader 问题:ERROR ITMS - 90534

    解决方法:这个原因 网上说法是 beta 测试版本:不过的确是beta版本(7.3 beta)打包的,所以我有下载了一个正式版本 7.1版本. 再次进行测试打包!

  7. CentOS6.4x84挂载U盘

    root用户登录 1. 查看磁盘情况: fdisk -l 信息如下: [root@CentOS6 ~]# fdisk -l Disk /dev/sda: 128.8 GB, 128849018880 ...

  8. volume image

    http://docs.openstack.org/user-guide/cli_nova_launch_instance_from_volume.html http://docs.openstack ...

  9. 2017-03-05 CentOS中配置守护服务(Supervisor)监听dotnet core web程序的运行

    我们继续解决上篇博客的问题,我这个人有个毛病,不喜欢遗留什么问题,也不喜欢问题说不明白,具体要怎么解决一定要详尽,因为经常自己遇到问题的时候,去翻别人的博客,就会遇到这样的问题,很苦恼,又说废话了. ...

  10. Announcing the Release of ASP.NET MVC 5.1, ASP.NET Web API 2.1 and ASP.NET Web Pages 3.1 for VS2012

    The NuGet packages for ASP.NET MVC 5.1, ASP.NET Web API 2.1 and ASP.NET Web Pages 3.1 are now live o ...