IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    在Debian下安装Systemtap方法

    admin发表于 2012-03-08 12:43:48
    love 0

    关于Systemtap的介绍,请移步到 这里 ,是调试内核和分析系统软件瓶颈的利器

    今天主要介绍下在debian系统的安装

    1. 安装Systemtap

    sudo apt-get install systemtap

    2. 安装elfutils

    apt-get install elfutils

    3. 安装kernel debug info包,否则无法追踪内核信息

    uname -r #查看内核版本
     
    sudo apt-get install linux-image-2.6.32-5-amd64-dbg  # 2.6.32-5-amd64为uname -r的命令输出
     
    sudo apt-get install linux-headers-2.6.32-5-amd64

    4. 测试

    sudo stap -k -e <code>'probe begin{printf("hello"); exit();}'

    具体关于Systemtap语法的使用,请参考下面链接
    http://sourceware.org/systemtap/documentation.html
    http://www.abc188.com/info/html/wangzhanyunying/jianzhanjingyan/20080417/69732.html
    5. 参考文章

    1. http://www.ningoo.net/html/2010/use_systemtap_on_ubuntu.html

    2. http://sourceware.org/systemtap/wiki/SystemtapOnDebian

    您可能对下面文章也感兴趣:

    • 使用Bash中Complete自动补全命令
    • Linux中关于Cache Memory的介绍
    • [shell学习笔记]sort、uniq、cut、paste和split用法详解
    • 关于pthread_cond_wait使用while循环判断的理解
    • linux通过Shell获得本机ip地址方法


沪ICP备19023445号-2号
友情链接