Linux下的万能观测工具.ppt

  1. 1、本文档共38页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
* SystemTap Linux下的万能观测工具 褚霸 核心系统数据库组 chuba@ 2010/11/18 Agenda 介绍SystemTap ? 安装和系统要求 ? 实践例子 ? 参考和杂项 ? 结论 SystemTap是什么? According to /systemtap/ ? SystemTap provides free software (GPL) infrastructure to simplify the gathering of information about the running Linux system. This assists diagnosis of a performance or functional problem. SystemTap eliminates the need for the developer to go through the tedious and disruptive instrument, recompile, install, and reboot sequence that may be otherwise required to collect data. ? ? ? 观察活体系统最佳工具,前提是你懂得如何观察! SystemTap是如何工作的 1. write or choose a script describing what you want to observe 2. stap translates it into a kernel module 3. stap loads the module and communicates with it ? 4. just wait for your data ? 五步走 #?stap -uv test.stp Pass 1: parsed user script and 74 library script(s) using 86868virt/20488res/1792shr kb, in 190usr/20sys/209real ms. Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) using 87264virt/21148res/1976shr kb, in 10usr/0sys/7real ms. Pass 3: translated to C into /tmp/stapz2iv97/stap_aef621603e006af62084b361e0a0c981_553.c using 87264virt/21332res/2144shr kb, in 0usr/0sys/0real ms. Pass 4: compiled C into stap_aef621603e006af62084b361e0a0c981_553.ko in 1230usr/160sys/1384real ms. Pass 5: starting run. Pass 5: run completed in 10usr/20sys/12331real ms. SystemTap 探测点例子 SystemTap is all about executing certain actions when hitting certain probe points. ? syscall.read ??????when entering read() system call syscall.close.return ????????when returning from the close() system call module(floppy).function(*) ????????when entering any function from the floppy module kernel.function(*@net/socket.c).return ????????when returning from any function in le net/socket.c kernel.statement(*@kernel/sched.c:2917) ????????when hitting line 2917 of le kernel/sched.c 更多探测点例子 timer.ms(200) ?????? every 200 milliseconds ? process(/bin/ls).function(*)??????? ?????? when entering any function in /bin/ls

文档评论(0)

kaku + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8124126005000000

1亿VIP精品文档

相关文档