在之前的blog里介绍了一堆systemtap的资料,然后之前一直没安装成功过,这次花时间重新搞了下,终于成功了,很是激动,故分享下,主要是错误处理的分享。
1: libdwfl failure (missing x86_64 kernel/module debuginfo under '/lib/modules/2.6.18-164.11.1.el5/build'):
这个错误是由于缺失 kernel-debuginfo-common 包和 kernel-debuginfo,解决方法是去http://rpm.pbone.net找到对应当前内核版本的debug包,如何看当前内核版本信息呢,使用如下命令 uname -r (一般我们使用uname -a)
切忌 一定要找合适的版本号
参考资料:http://steven1981.itpub.net/post/7967/525257
然后sudo rpm ivh XXXXXXXX
安装好了以后可以看到 /usr/lib/debug 目录下有东西了。
然后需要告诉Systemtap去找这个debug信息了。
参考资料来自:
http://sources.redhat.com/git/?p=systemtap.git;a=blob_plain;f=README;hb=HEAD
- By default, systemtap looks for the debug info in these locations:
/boot/vmlinux-`uname -r`
/usr/lib/debug/lib/modules/`uname -r`/vmlinux
/lib/modules/`uname -r`/vmlinux
/lib/modules/`uname -r`/build/vmlinux
依据这个默认搜索路径,我们可以将debug的vmlinux链接到/lib/modules下,例如我的
sudo ln -s /usr/lib/debug/lib/modules/2.6.18-164.15.1.el5/vmlinux /lib/modules/2.6.18-164.el5xen
2:当执行简单的probe begin { log("hello world") exit() }可以,但是执行复杂的脚本就报以下错误
semantic error: failed to retrieve location attribute for local ‘next’ (dieoffset: 0x6660f0): identifier ‘$next’ at /usr/share/systemtap/tapset/scheduler.stp:39:17
source: task_next = $next
排除你内核debug版本不一致的问题,一般这个错误可以升级当前的systemtap版本解决
sudo yum update systemtap
3:Array overflow, check MAXMAPENTRIES near identifier
解决方案是 -DMAXMAPENTRIES=10240 类似java -D参数
这里可以参见霸爷的blog的文章:
突破systemtap脚本对资源使用的限制
http://blog.yufeng.info/archives/1213
分享到:
相关推荐
Red Hat Enterprise Linux 6 SystemTap Tapset Reference For SystemTap in Red Hat Enterprise Linux 6
Red Hat Enterprise Linux 6 SystemTap Beginners Guide Introduction to SystemTap
Linux内核调试新秀SystemTap.pdf
SystemTap使得动态收集Linux内核信息和性能数据变得轻而易举,这就使人可以从繁琐的数据采集中解放出来,而专注于数据的处理和分析,这无疑 是内核开发人员和系统管理人员的福音。随着越来越多用户的体验,越来越多...
本文主要介绍在ubuntu平台 + 自定义内核上如何安装systemtap工具包及解决编译加载运行过程中的一些问题,如何利用systemtap工具监测分析内核函数,内核模块及用户态程序。
基于SystemTap的Linux服务器性能分析系统的设计与实现.pdf
動態 Linux kernel 測試工具:SystemTap
总共包含以下文档: Language Reference.pdf // 详细说明systemtap脚本的语法规则 ...Instrumenting the Linux Kernel for Analyzing Performance and Functional Problems.pdf // systemtap工具的原理和安装方法
systemtap使用说明,英文版,包括简单用例,和实现方式,探测实现方式
linux 调试神器,linux 调试神器,linux 调试神器,linux 调试神器
官方离线安装包,亲测可用。使用rpm -ivh [rpm完整包名] 进行安装
学习Linux性能优化必不可少的工具sytemtap。想学习的同学可以下载。
讲述了systemTap的实现原理,以及手把手教你怎样搭建一个systemTap环境用于debug linux内核。很权威的官方文档
SystemTap 是一种新颖的 Linux 内核诊断工具,提供了一种从运行中的 Linux 内核快速和安全地获取信息的能力。SystemTap 是内核开发人员和系统管理员的福音,因为这使得他们可以通过编写或者重用简单的脚本来收集内核...
Probe linux kernel functions to collect debug informations.
您Linux系统上至少需要systemtap 2.1+和perl 5.6.1+。 要从源代码构建最新的systemtap,请参阅此文档: : 另外,如果没有从源代码编译Nginx,则应确保已为Nginx(和其他依赖项)启用(DWARF)debuginfo(或单独...
为了重现Linux服务器运行时所有进程/线程的运行状态、相互间的通信状况及对系统资源如cpu、disk、Network Interface Card等的占用情况,本文通过对动态跟踪工具 SystemTap 的运行...该系统采用C/S架构,可由...
systemtap是Linux下面一个非常好用的探测工具,这是作者使用systemtap的日记,比较具有参考价值。
(1)Install the Linux kernel debug image ---------------------------------------------------------- Add debug source to the sources list of Ubuntu Create an /etc/apt/sources.list.d/ddebs.list by ...